UDF testing in micro(A)

Started by Zlatko Vid, May 01, 2024, 08:05:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zlatko Vid

and now test with 3 params and one of them is
expression with built-in function sin(90)

' function with arguments
var g : g = 50 : wcolor 0,0,0 : mode 1
fcolor 150,240,150 :print 5,10,"global:": print 100,10,g : swap
' func call with params...
myFn(5,3+g,2*sin(90))

func myFn(var a,var b,var c)
  fcolor 250,200,150
  print 50,30,"local a"
  print 50,50,a
  print 50,80,"local b"
  print 50,100,b
  var f : f = a + b + c
  fcolor 150,200,250 :print 5,150,"result:": print 100,150,f
  swap   
endFn