Skip to content

Standart Framework

Alexander (Arkasha) edited this page Jan 18, 2020 · 5 revisions

Standart Framework v 1.0.0

Standart - is framework where:

  • Add base expressions
  • Add base classes

Classes

void

void - is the first class and parent of any classes in WoL Virtual - STRUCT - PUBLIC
Parents ierarchy: void

Constants

  1. null - <null:void> - just nothing - set : &@a, <null:void> ;

bool

bool - is the structure is needed to represent true, false - STRUCT - PUBLIC
Parents ierarchy: void -> bool

Constants

  1. true - <1:int> - true (logic XD) - ifelse : <true:bool>, %a;
  2. false - <0:int> - false (logic :D) - ifelse : <false:bool>, %a;

byte

byte - is the structure is needed to represent integers from 0 until 256 - STRUCT - PUBLIC
Parents ierarchy: void -> byte

short

short - is the structure is needed to represent integers from -32768 until 32767 - STRUCT - PUBLIC
Parents ierarchy: void -> byte -> short

int

int - is the structure is needed to represent integers from -2147483648 until 2147483647 - STRUCT - PUBLIC
Parents ierarchy: void -> byte -> short -> int

float

float - is the structure is needed to represent real numbers from -3.410^38 until 3.410^38 - STRUCT - PUBLIC
Parents ierarchy: void -> byte -> short -> int -> float

long

long - is the structure is needed to represent integers from -2147483648 until 2147483647 - STRUCT - PUBLIC
Parents ierarchy: void -> byte -> short -> int -> long

double

double - is the structure is needed to represent real numbers from ±5.010^-324 until ±1.710^308 - STRUCT - PUBLIC
Parents ierarchy: void -> byte -> short -> int -> float -> double

char

char - is the structure is needed to represent - STRUCT - PUBLIC Parents ierarchy: void -> char

string

string - is the class to represent strings (lists of characters) - DEFAULT - PUBLIC Parents ierarchy: void -> string

Block

Block - is the class is needed to represent block of expressions - DEFAULT - PUBLIC Parents ierarchy: void -> Block

Func

Func - is the class is needed to represent functions - DEFAULT - PUBLIC Parents ierarchy: void -> Func

Array

Array - is the class is needed to represent arrays - DEFAULT - PUBLIC Parents ierarchy: void -> Array

Expressions

  1. PlusExpression - plus - add two numbers - print : (plus : <1:byte>, <2:byte>);
  2. LoadsExpression - _loads - load framework - _loads : <wolSystem:string> ;
  3. IfExpression - ifelse - linearly finds the correct condition and if the condition is true, then the block run fulfills, otherwise the last block fulfills (if blocks > 1) - ifelse : @cond, %if_block, %else_block ;
  4. LessSignExpression - ls - if first value smaller then second => return true, else => return false - while a (ls : @i, <5:int>);
  5. MoreSignExpression - ms - if first value bigger then second => return true, else => return false - while a (ms : @i, <5:int>);
  6. InversionExpression - not - if value = true return false else return true - ifelse : (not : <true:bool>), %running_block ;
  7. EqualsExpression - equals - if first value equals second value return true else return false - ifelse : (equals : @a, @b), %a, %b;
  8. RunExpression - run - run block - run : %any_block ;
  9. LengthExpression - length - eval length of string or array - while a (ls : @i, (length : @str));
  10. AndExpression - and
  11. OrExpression - or
  12. MinusExpression - minus
  13. MultiplyExpression - multiply
  14. DivExpression - div
  15. ModExpression - mod
  16. SetExpression - set - set value in second argument to value by link in first argument - set : &@a, <0:int> ;
  17. GetElementExpression - getByIndex - get object (char) by getted index of string or array - print : <First element of array is :string>, (getByIndex : @arr, <0:int>);
  18. SetElementExpression - setElem - set object to getted position of array - setElem : @arr, <Tom:string>, <1:int>; - added in 0.8.2 version
  19. NewArrayExpression - newArray - return empty array with getted length - push-local arr (newArray : <3:int> ); - added in 0.8.2 version
  20. ParseIntExpression - parseInt - get integer from string - print : (plus : <100:int>, (parseInt : (input)));
  21. ParseDoubleExpression - parseDouble - get double from string - print : (plus : <35.2465:double>, (parseDouble : (input)));
  22. TypeofExpression - typeof - get type by name - typeof : (input);

Clone this wiki locally