MyChat Scripts Engine: Inc
Increasing a variable value by 1.
Syntax
procedure Inc(var x);
Parameters and return values
Parameter |
Type |
Value |
x |
number or enumerated type |
value that you need to increase by 1. |
Function result
Variable increases its value by 1.
Example
var
i, x: integer;
begin
x := 100;
for i := 1 to 5 do begin
dec(x);
mLogScript('x = ' + inttostr(x), '');
end;
end.
Script work result
[15:16:46] (Log "Dec"): x = 99
[15:16:46] (Log "Dec"): x = 98
[15:16:46] (Log "Dec"): x = 97
[15:16:46] (Log "Dec"): x = 96
[15:16:46] (Log "Dec"): x = 95
See also
Created with the Personal Edition of HelpNDoc: Full-featured multi-format Help generator