Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Product Manuals » Elevate Web Builder 3 Manual » Language Reference » Statements |
<Variable> := <Type-Compatible Expression>;
var MyInteger: Integer; MyString: String; begin MyInteger := (100 * MyIntegerConstant); MyString := 'This is a test'; end;
if <Boolean Expression> then <Code Block> [else if <Boolean Expression> then <Code Block>] [else <Code Block>];
var MyBoolean: Boolean; begin MyBoolean:=False; if MyBoolean then ShowMessage('This will never execute') else ShowMessage('This will always execute'); end;
case <Expression> of <Expression>[, <Expression}: <Code Block>; [<Expression>[, <Expression}: <Code Block>;] [else <Code Block>;] end;
var MyString: String; begin MyString:='Hello World'; case MyString of 'Hello': ShowMessage('Hello'); 'World': ShowMessage('World'); else ShowMessage('None of the above'); end; end;
while <Boolean Expression> do <Code Block>;
var MyBoolean: Boolean; begin MyBoolean:=True; while MyBoolean do begin ShowMessage('Still looping...'); if MyBoolean then MyBoolean:=False; end; end;
repeat <Code Block>; until <Boolean Expression>;
var MyBoolean: Boolean; begin MyBoolean:=False; repeat begin ShowMessage('Still looping...'); if (not MyBoolean) then MyBoolean:=True; end; until MyBoolean; end;
for <Integer Value Assignment> to|downto <Integer Expression> do <Code Block>;
var MyInteger: Integer; MyString: String='Hello world'; begin for MyInteger:=1 to Length(MyString) do ShowMessage('Character is '+MyString[MyInteger]+'...'); end;
break;
var MyInteger: Integer; MyString: String='Hello world'; begin for MyInteger:=1 to Length(MyString) do begin ShowMessage('Character is '+MyString[MyInteger]+'...'); if MyString[MyInteger]='w' then break; end; end;
continue;
var MyBoolean: Boolean; begin MyBoolean:=True; while MyBoolean do begin ShowMessage('Still looping...forever'); continue; if MyBoolean then MyBoolean:=False; end; end;
exit;
with <Class Instance> do <Code Block>;
var MyInstance: TMyClass; begin MyInstance:=TMyClass.Create; with MyInstance do begin MyIntegerProperty:=100; MyStringProperty:='Hello world'; end; MyInstance.Free; end;
begin <Statement>; [<Statement>]; end;
var MyInteger: Integer; MyString: String='Hello world'; MyOtherString: String=''; begin for MyInteger:=1 to Length(MyString) do MyOtherString := MyOtherString + MyString[MyInteger]; end;
var MyString: String; begin MyString := 'This is a test'; end;
var MyString: String; begin if MyParameter then MyString := 'This is a test' else MyString := 'This is not a test'; end;
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |