Example

Top  Previous  Next

Here is a sample script (save it in the scripts folder with a ‘.ds’ extender, eg ‘test.ds’)

 

; DracScript to demonstrate functions, loops and conditions
 
woo=-4
joy='Awesome='+Ftrim(Abs(woo)+Abs(-1*Abs(-10+1)))
Information('Result:',joy)
 
with='Eval: '+Eval(6.6+1.1)
without='Eval'+6.6+1.1
Information(with,without)
 
qwe=4
While qwe>1
Information('outer loop execute',qwe)
asd=8
While asd<11
  Information('inner loop execute',asd)
  asd=asd+1.0
Wend
qwe=qwe-1
Wend
 
joe='a'
tom='b'
If joe<tom
Information('joe is less than tom','')
Else
Information('joe is not less than tom','')
EndIf
 
; End of script!