Files
tp2-vsl-pds/tests/testlevel2/level2expr.vsl
Dimitri Lajou 7114c0e978 Initial commit
2025-03-21 17:26:31 +01:00

13 lines
341 B
Plaintext

PROTO VOID expr(x,y)
FUNC VOID main() { expr(1,3) expr(5,2) }
FUNC VOID expr(x,y) {
PRINT x,"+",y," = ", x+y ,"\n"
PRINT x,"-",y," = ", x-y ,"\n"
PRINT x,"*",y," = ", x*y ,"\n"
PRINT x,"/",y," = ", x/y ,"\n"
PRINT x,"+",1," = ", x+1 ,"\n"
PRINT x,"* (",x,"+",y,") = ", x*(x+y) ,"\n"
PRINT x,"* ",x,"+",y," = ", x * x + y ,"\n"
}