Decimal numbers operations

Discuss RoboTask here
Post Reply
marcolobaido
Posts: 70
Joined: Thu Jul 02, 2015 3:54 pm

Decimal numbers operations

Post by marcolobaido »

Hi, can I add two decimal numbers using the arithmetical operation feature?
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Decimal numbers operations

Post by Oleg »

If you want to use the real numbers (non-integer) use quotes
like this

Code: Select all

{Add("17,56","8,92")}
also look at the example below

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DisableOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task1041"
Hide=INTEGER|0
ID=INTEGER|1172306503
LogOnAsUser=INTEGER|1
Name=STRING|"Show ""{Add(""17,56"",""8,92"")}""..."
OnErrorTaskID=INTEGER|1879502808
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER

[Actions\Action1]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{Add(""17,56"",""8,92"")}"""
Params=FOLDER

[Actions\Action1\Params]
icon=STRING|"1"
msg0=STRING|"{Add(""17,56"",""8,92"")}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
But please note the decimal divider can be dot "." or comma "," in different regional settings.
Oleg Yershov
Post Reply