You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 3 Current »
SIL supports the standard operators (+, -, *, /, %), however, those operators can be used on more than just numbers.
number total = 10; total = total + surcharge; total = total - discount; total += total * .05; return total;
string someText = "Hello "; someText = someText + "World!"; someText = someText - "World"; return someText; //returns "Hello !";
date duration = (dueDate + "2w") - startDate;
interval day = "24h"; interval month = day * 30;
Contents
For more information about using arithmetic operators see this page.