Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7774609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:25:18+00:00 2026-06-01T17:25:18+00:00

I need a clarification of this case. According my tests the Result variable is

  • 0

I need a clarification of this case.

According my tests the Result variable is defined to:
Boolean=False, Integer=0, String=”, Object=nil etc from the first line.
But I have never seen an official reference for this.
It also make sense as this gives the hint.

[DCC Warning] Unit1.pas(35): H2077 Value assigned to ‘TForm1.Test’ never used

function TForm1.Test: Boolean;
begin
  Result := False;
  // Some arbitrary code here

  Result := True;
end;

But what happens if I comment out the first line and there is an exception somewhere before last line? Is Result = False ?

If Result is undefined this means that I always have to start every function by defining Result in case of exception later. And this make no sense for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T17:25:19+00:00Added an answer on June 1, 2026 at 5:25 pm

    No, Result has no (guaranteed) default value. It is undefined unless you give it a value. This is implied by the documentation, which states

    If the function exits without assigning a value to Result or the
    function name, then the function’s return value is undefined.

    I just tried

    function test: integer;
    begin
      ShowMessage(IntToStr(result));
    end;
    

    and got a message with the text 35531136.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just need some clarification on variables A normal variable has 2 parts to
I thought I knew this, but am confused :( Need some clarification on it
I need clarification in calling methodologies, i have a base class and from which
I just need clarification on what a managed prototype is. I think it is
I need some clarification. I have a Reportwriter dll that uses Crystal Reports. It
I am using SDL Tridion 2011 SP1. I need small clarification regarding multimedia schema
First, it is long post so if you need clarification please let me know.
I need a clarification on one of scenarios of <xsd:any> . What if namespace
I need some help with this please I can't get a handle on it.
Suppose that I have a Java program within an IDE (Eclipse in this case).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.