14 lines
301 B
Text
14 lines
301 B
Text
|
|
Define mynum = 1 © Two ways to assign a number
|
|||
|
|
1 → mynum
|
|||
|
|
|
|||
|
|
Define myfunc(x) = (sin(x))^2 © Two ways to assign a function
|
|||
|
|
(sin(x))^2 → myfunc(x)
|
|||
|
|
|
|||
|
|
Define myfunc(x) = Func © Multi-statement function
|
|||
|
|
If x < 0 Then
|
|||
|
|
Return –x
|
|||
|
|
Else
|
|||
|
|
Return x
|
|||
|
|
EndIf
|
|||
|
|
EndFunc
|