
Writing Technician Interface Scripts
2-22 117382-A Rev. A
let -date -time localtime = date() + time()
echo $localtime
10/11/95 15:24:05
let -date -time london = date(“10/7/95”) + time(“7:04”) + \
timezone() - timezone(“+00:00”)
echo $london
10/07/95 12:04:00
let -date -time newyork = date(“10/7/95”) + time(“7:04”) + \
timezone() - timezone(“-05:00”)
let -date -time la = date(“10/7/95”) + time(“7:04”) + \
timezone() - timezone(“-08:00”)
let -days -time time_left = date(“12/25”)-(date()+time())
echo $time_left
74 days 08:34:58
Example4
The following example shows how to use the let command to set up a slotmask:
let slot = $<Enter Slot Number>
let -h slotmask = 0x80000000 >> ($slot - 1)
echo “slot #” $slot “slotmask” $slotmask
More Examples
Additional examples using the let command are shown below:
let b = 5 * (10**2);
let capA = 'A'
set env letter “A”
let capA = '$letter'
let len = strlen(“abcdef”)
setenv string “answer=1”
let len = strlen(string)
let index = strindex(string, “wer”)
let index = strpbrk(string, “=:;”)
if $index = 0 then; echo “Missing Delimiter”
let index = strmatch(string, “pat”)
if $index = 0 then; echo “No match found”
Commenti su questo manuale