7.6

Table Of Contents
Example 1
-12 %Returns -12
-&max %Returns negative of the value of the variable &max
neg(-12.45) %Returns 12.45
Ord (function)
Returns the ASCII value of a character.
Syntax
ord( string ) integer value
Argument
string
String value whose ASCII value is returned. Only the first character is considered.
Code Sample Example
This example shows how to determine if a character is lowercase or uppercase.
Example
define(&data,string,'a') %Define sample string
if((ord(&data)>=97) and (ord(&data)<=122))
%Test lowercase
show(&data+' is lowercase')
elseif()
if((ord(&data)>=65) and (ord(&data)<=90))
%Test uppercase
show(&data+' is uppercase')
elseif()
show(&data+' is not between A and Z or a to z')
endif()
endif()
©2010 Objectif Lune Inc - 523 -