...
Here is a list of the available operators in a SIL SIL™ program and detailed usage information.
...
Operator | Operands | Return | Explanations and Usage | ||
---|---|---|---|---|---|
?: | boolean, <type>, <type> | <type> |
If <condition> is true, returns <ifTrueValue>, otherwise returns <ifFalseValue>. Note that <ifTrueValue> and <ifFalseValue> must have same type. |
...
Anchor | ||||
---|---|---|---|---|
|
...
The indexing operator can also be used with certain simple types (not arrays) and a specific value to provide additional functionality.
SIL SIL™ type | Index Value | Get | Get Return Type | Set |
---|---|---|---|---|
string | a number | Gets the character at the specified index in the string | string | Inserts a character at the specified index. If given a longer string, it will insert the first character of the string. |
date | "DAY" | Gets the day of month from the date | number | Unsupported |
"MONTH" | Gets the month from the date | number | Unsupported | |
"YEAR" | Gets the year from the date | number | Unsupported | |
"HOUR" | Gets the hour (0-23) from the date | number | Unsupported | |
"MINUTE" | Gets the minute (0-59) from the date | number | Unsupported | |
"SECOND" | Gets the seconds (0-59) from the date | number | Unsupported | |
"MILLISECOND" | Gets the milliseconds (0-999) from the date | number | Unsupported | |
"WEEK" | Gets the week number within the current year | number | Unsupported | |
"WEEKINMONTH" | Gets the week number within the current month | number | Unsupported | |
"TOMILLIS" | Gets the current time as UTC milliseconds from the epoch. | number | Unsupported | |
"DAYOFWEEK" | Gets the three letter format for the day of the week (e.g. "Mon", "Tue", "Wed" etc) | string | Unsupported | |
"MONTHNAME" | Gets the three letter format for the name of the month (e.g. "Jan", "Feb", "Mar", etc.) | string | Unsupported | |
interval | "WEEK" | Gets the number of whole weeks inside the interval (e.g. interval i = "1w 14d"; i["WEEK"] will return 3) | number | Unsupported |
"DAY" | Gets the number of whole days inside the interval (e.g. interval i = "1d 48h"; i["DAY"] will return 3) | number | Unsupported | |
"HOUR" | Gets the number of whole hours inside the interval (e.g. interval i = "1h 120m"; i["HOUR"] will return 3) | number | Unsupported | |
"MINUTE" | Gets the number of whole miuntes inside the interval (e.g. interval i = "1m 120s"; i["MINUTE"] will return 3) | number | Unsupported | |
"SECOND" | Gets the number of seconds inside the interval (e.g. interval i = "1h 1m 3s"; i["SECOND"] will return 3) | number | Unsupported | |
"TOMILLIS" | Gets the number of milliseconds inside the interval | number | Unsupported |
...