0
if / then / else
if / then / else
can I add 4 strings like this ?
5 replies
-
Yes, but you could also use switch , e.g. :
switch <expression> do
case <value>: <result value>
case <value2>: <result value2>
...
default: <default value>
endSteven.
-
If I use this, after the 2nd add, the result becomes 0 ...
if 'Pratiche Svolte' = "1" then
250
else
0
end + if 'Pratiche Svolte' = "2" then
250
else
0
end + if 'Pratiche Svolte' = "3" then
500
else
0
end + if 'Pratiche Svolte' = "4" then
1000
else
0
end -
switch 'Pratiche Svolte' do
case "1" : 250
case "2" : 250
case "3" : 500
case "4" : 1000
default : 0
end -
or something like this to add:
Vota := Vota + switch 'Pratiche Svolte' do
case "1":
250
case "2":
250
case "3":
500
case "4":
1000
default:
0
end -
Not working... same result..
sorry, but thks for.
Content aside
- 4 yrs agoLast active
- 5Replies
- 601Views