Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)
Chapter 10 193
Technical Articles
CI Enhancements
then the suffix is removed from the BASENAME. suffix applies to MPE and
POSIX names. The suffix portion of the BASENAME will not be deleted if
this results in deleting the entire basename.
Examples
CALC basename('a.b.c')
A
CALC basename('/a/b/c')
c
CALC basename('./a/b')
b
CALC basename("./a.sl",".sl")
a
CALC basename('/')
/
CALC basename("*feq")
*FEQ
CALC basename('$null')
$NULL
CALC basename('abc.g','c')
AB
CALC basename('/usr/lib/liby.a','.a')
liby
CALC basename('/usr/lib/liby.a','liby.a')
liby.a
DECIMAL
DECIMAL()returns a string value of an integer. String function.
Syntax
DECIMAL(int)
This new function behaves analogously to the existing hex() and
octal() functions. It accepts a single integer argument and
functionally returns the decimal string equivalent.
Examples
CALC decimal(255)
255 <--asastring
CALC len(decimal($ff))
3, $3, %3
setvar i 0
while setvar(i,i+1) < 10 and finfo("FILE"+DECIMAL(i), 'exists') d
o
...
The last example is significant since this is the only case where explicit
variable substitution ('!varname') does not work as an alternative to
decimal. If the finfo() line was written as:
finfo("FILE"+"!i", 'exists') do