Page 1 of 1

Decimal numbers operations

Posted: Thu Sep 01, 2022 3:36 pm
by marcolobaido
Hi, can I add two decimal numbers using the arithmetical operation feature?

Re: Decimal numbers operations

Posted: Thu Sep 01, 2022 4:11 pm
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.