hi so i made another programming language #410

 
Jmzd8 (edited ) src #3983

called nbasc, using function names that are super short. (because I got bored)

guess what this piece of code does:

senum x
senum y
lovar x
nnadd 1
lovar y
nnadd 1
vcrpos x,y
stpri #
if x,>10,11
ntolin 3
#end

take a wild guess. (I'll tell in the comments later if no one figures it out)

and guess what this also does:

senum x
senum x_sin
senum y
senum half
lovar half
nnset 1
nndiv 2
lovar x
nnadd 1
lovar x_sin
nnvadd half
lovar y
nnvsin x_sin
nnadd 5
nnmul 3
vcrpos x,y
stpri #
if x,>40,20
ntolin 8
stpri .
stpri .
stpri .
#end

(I could have made this better but i'm lazy lol)

okay goodbye

caesar src #3984

the first code creates and initialises two variables (x and y) to 1. it then forms a vector of both of them, and prints that vector of integers as a string (so, prints x and y). if x is greater than 10, it jumps to line 11 (the end of program), which skips line 10. line 10 is executed if x is not greater than 10. it jumps back to line 3.

razetime src #3986

cool. is this the only specification of it?

Jmzd8 src #3987

(sorry for replying so late)

caesar: you are somewhat right, vcrpos is for setting the cursor position in the terminal using variable names, and stpri is for printing a string given in its arguments (therefore it will print "#")

razetime: I have a readme thats still unfinished if thats what you mean

Jmzd8 (edited ) src #3988

so what the first code does:

it sets a variable named x and y (senum x, senum y)

it loads x to be used (lovar x)

it adds 1 to the current loaded variable (x) (nnadd 1)

it loads y to be used (lovar y)

it adds 1 to the current loaded variable (x) (nnadd 1)

it changes the current position of the cursor to x and y in the terminal (vcrpos x,y)

it prints the character # (stpri #)

it checks if x is greater than 10, if it is then it goes to line 11 (if x,>10,11) if it doesnt it goes to the next line

it goes back to line 3 if x isnt greater than 10 (ntolin 3)

and #end is the end

please log in to reply to this thread