Method Returns String of Boolean - Why Dont You Need to Include "= True" or "= False" ?



>From a article at Realbasic Univeristy: Column 35 the following method was
obtained:

Function bStr(b as boolean) As string
If b then
return "true"
else
return "false"
end if
End Function

So MsgBox bStr(false) would produce "False" in a message box. What the
code appears to be really saying is:

Function bStr(b as boolean) As string
If b = true then
return "true"
else if b = false then
return "false"
end if
End Function

My question is why do you have to include the part "= true". I understand
why you do not have to include "= false" because its taken care of by the
previous lines; however, I do not udnerstand why in the first example you
are allowed to skip including the "=" part at all. how does RB know you
are talking about true in the first line if you do include it? I
understand booleans are false by default, but I don't get this.


.



Relevant Pages

  • Connecting to Sharepoint Problem
    ... String bstrCurrentFolderUrl, Boolean& pbCanCustomizePages, Boolean& ... pVerGhostedSetupPath, UInt32& pdwPartCount, Object& pvarMetaData, ... pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& ...
    (microsoft.public.biztalk.general)
  • Re: Connecting to Sharepoint Problem
    ... String bstrCurrentFolderUrl, Boolean& pbCanCustomizePages, Boolean& ... pVerGhostedSetupPath, UInt32& pdwPartCount, Object& pvarMetaData, ... pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& ...
    (microsoft.public.biztalk.general)
  • RE: installation WSS 3.0
    ... <exception, Boolean breakConnection) ... <owningObject, SqlConnectionString connectionOptions, String newPassword, ... <newDatabaseId, String strDatabaseServer, String strDatabaseName, String ... <databaseServer, String databaseName, String databaseUsername, String ...
    (microsoft.public.windows.server.sbs)
  • Die Datei, die Sie zu speichern oder wiederherstellen versuchen, wurde von den Webserveradministrato
    ... bstrUrl, Byte bPageView, Byte bPageMode, Byte bGetBuildDependencySet, ... String bstrCurrentFolderUrl, Boolean& pbCanCustomizePages, Boolean& ... Object& pvarMultipleMeetingDoclibRootFolders, String& ...
    (microsoft.public.de.german.sharepointportalserver)
  • installation WSS 3.0
    ... Boolean redirectedUserInstance) ... identity, SqlConnectionString connectionOptions, Object providerInfo, String ... strDatabaseServer, String strDatabaseName, String strDatabaseUsername, String ... databaseServer, String databaseName, String databaseUsername, String ...
    (microsoft.public.windows.server.sbs)