Difference between revisions of "CTRL()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return the numeric value of a control character
 
Function to return the numeric value of a control character
 
  
 
==Syntax==
 
==Syntax==
 
CTRL(<expC>)
 
CTRL(<expC>)
 
  
 
==See Also==
 
==See Also==
[[@...GET]], [[@...MENU]], [[INKEY()]], [[LASTKEY()]], [[NEXTKEY()]], [[READKEY()]], [[SET KEY]]
+
[[ASC()]], [[CHR()]]
 
+
  
 
==Description==
 
==Description==
The CTRL() function returns the numeric value of the specified control character. This function is extremely useful, when used in conjunction with the LASTKEY(), NEXTKEY() or READKEY() functions, for creating terminal independent programs.
+
The CTRL() function returns the numeric value of the specified control character.
 
+
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
if readkey()=ctrl('g')
+
abandon = ctrl('g')
    set message to "Operation canceled."
+
endif
+
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 09:13, 16 November 2011

Purpose

Function to return the numeric value of a control character

Syntax

CTRL(<expC>)

See Also

ASC(), CHR()

Description

The CTRL() function returns the numeric value of the specified control character.

Example

abandon = ctrl('g')