if in the DuScript

·

1 min read

if

if - from the name it is clear

Splitting lines inside the "if" block is carried out through the symbol "^"

Space before () is required

if ([condition]) { 
    [body]^
};

Sample:

approve msg = Int 1;
if (@msg==1) {
    call variable v msg^
};

Will: 1