Voclex

From Esolang
Jump to navigation Jump to search

Voclex is esoteric, very functional based language. Here is all is functions.

Examples

Hello, world!

main{
rem($COM$ is comma, because comma symbol is special symbol);
outputln(Hello$COM$ world!)l
}

Truth-machine

one{
output(1);
one();
}
zero{
output(0);
stop();
}
main{
set(inp,input(> ));
if(=(get(inp),0),{
zero();
},{
if(=(get(inp),1),{
one();
},{});
});

Docs

Instruction Desc
output(str) output string to screen
outputln(str) output string to screen with line feed
rem(anytext) Comment
chr(ascii) Returns char by his ascii code
ord(abysymbol) Returns ascii code of char
strcat(str1,str2) Contactive strings
strcmp(str1,str2) Compare strings
strrev(str) Reverse str
strrep(str,what,to) Replace what to to in str
strlen(str) Returns string length
strtolow(str) Converts string to lower case
strtoup(str) Converts string to upper case
+(a,b) -(a,b) *(a,b) /(a,b) %(a,b) Math
=(a,b) !(a,b) !=(a,b) >=(a,b) <=(a,b) <(a,b) >(a,b) Condtitional
if(cond,{true},{false}) Condtitional
ifNot(cond,{true},{false}) Condtitional
stop() Stop execution
set(var,val) Set variable
get(var) Returns variable value
inc(a) dec(a) Returns a+1 or a-1

Soon will added all commands.

External resources