Barcode sato international pte



Yüklə 401,84 Kb.
Pdf görüntüsü
səhifə11/13
tarix05.10.2018
ölçüsü401,84 Kb.
#72511
1   ...   5   6   7   8   9   10   11   12   13

Keyboard 

Programming Manual  

59 

SATO Europe 



 

ABS() 


Description 

To return the absolute value of the expression. 

 

Syntax 


ABS(expression) 

 

Remarks 



The result of the expression must be numeric. 

 

Example 



X=ABS(5-12) 


Programming Manual                                                      Keyboard

 

SATO Europe 



60

 

 



ASC() 

Description 

To return the value of the ASCII code for the first character of the expression. 

 

Syntax 



ASC(expression) 

 

Remarks 



The result of the expression must be a string. 

 

Example 



X=ASC(“A”) 

 



Keyboard 

Programming Manual  

61 

SATO Europe 



 

LEN() 


Description 

To return the length of the string. 

 

Syntax 


LEN(string expression) 

 

Remarks 



The maximum returned string length is 255. 

 

Example 



X=LEN(“A”) 


Programming Manual                                                      Keyboard

 

SATO Europe 



62

 

 



FRE() 

Description 

Return the size of free memory. 

 

Syntax 



FRE( ) 

 

Remarks 



Calculates and returns an integer to indicate free memory size of the K012 in K Bytes. 

 

Example 



A=FRE( ) 

PRINT A 



Keyboard 

Programming Manual  

63 

SATO Europe 



 

INT() 


Description 

To truncate an expression to an integral number. 

 

Syntax 


INT(expression) 

 

Remarks 



The result of the expression must be numeric. 

 

Example 



A=INT(5/2) 


Programming Manual                                                      Keyboard

 

SATO Europe 



64

 

 



VAL() 

Description 

To return the numerical value of the string expression. 

 

Syntax 



VAL(expression) 

 

Remarks 



The result of the expression must be a string. 

 

Example 



A=VAL(“1234”) 


Keyboard 

Programming Manual  

65 

SATO Europe 



 

RND() 


Description 

RND returns a number between 0 and 1 

 

Syntax 


A=RND() 

 

Remarks 



N/A 

 

Example 



 

A=RND() 



Programming Manual                                                      Keyboard

 

SATO Europe 



66

 

 



CHR$() 

Description 

To return the ASCII character of the numerical expression. 

 

Syntax 



CHR$(expression) 

 

Remarks 



The result of the expression must be numeric. 

 

Example 



A$=CHR$(27) 

 

Used, for example to send and ESCAPE or other control code to a printer.




Keyboard 

Programming Manual  

67 

SATO Europe 



 

FREAD$() 

Description 

To read a number of bytes from specified file. 

 

Syntax 


FREAD$ (FileHandle, count) 

 

Remarks 



Count is the number of data bytes. Maximum count size is 255. 

 

Example 



OPEN “DATA” FOR INPUT AS #1 

A$=FREAD$(1,20) 

CLOSE #1 

END 



Programming Manual                                                      Keyboard

 

SATO Europe 



68

 

 



LEFT$() 

Description 

To return a number of the leftmost characters of the string expression. 

 

Syntax 



LEFT$(expression, count) 

 

Remarks 



The result of the expression must be a string. 

Count is the number of the leftmost characters. 

 

Example 


10 A$=LEFT$(“123456”,3) 


Keyboard 

Programming Manual  

69 

SATO Europe 



 

RIGHT$() 

Description 

To return a number of the rightmost characters of the string expression. 

 

Syntax 


RIGHT$(expression, count) 

 

Remarks 



The result of the expression must be a string. 

Count is the number of the rightmost characters. 

 

Example 


A$=RIGHT$(“123456”,3) 


Programming Manual                                                      Keyboard

 

SATO Europe 



70

 

 



MID$() 

Description 

To return a number of characters beginning from the starting parameter to the 

specified length. 

 

Syntax 


MID$(String, Starting, Length) 

 

Remarks 



String:  Can be a string or expression 

Start: 


Character position in string at which the part to be taken begins. If start is 

greater than the number of characters in string, Mid returns a zero-length 

string (""). 

Length:  The numbers of characters to be returned. 

 

Example 


A$=MID$(“123456”,3,3) 


Yüklə 401,84 Kb.

Dostları ilə paylaş:
1   ...   5   6   7   8   9   10   11   12   13




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə