Publication 1746-PM001A-US-P
BASIC Macro Library
A-7
String Routines
The following table describes the macro CALLs used for string routines.
Table A.7 String Routine Macros
String Routine
Macro CALLs
Macro
Inputs
Outputs
string_repeat(%1,%2)
Allows you to repeat a character %1 times and
copy it into $(%2).
%1 = Number of times to
repeat the character.
%2 = The string number
containing the character.
$(%2) = The new
string.
string_append(%1,%2)
Concatenates two strings (%1 and %2), then stores
the result in %2.
%1 = Number of string to
be appended.
%2 = Number of the base
string.
$(%2) = The
concatenated string.
num_to_str(%1,%2)
Converts %1 from a numeric value to a string, then
stores the result in $(%2).
%1 = Value to be
converted.
%2 = Number of the base
string.
$(%2) = The string
converted data.
str_to_num(%1,%2,%3)
Converts (%1) from a string to a numeric value, then
stores the result in (%3). %2 is a validity code.
%1 = String number to be
converted.
%2 = Validity of
output value.
0 = Value not valid.
1 < Valid Value < 255
%3 = Converted
value.
find_str_in_str(%1,%2,%3)
Finds a string within a string. It locates the first
occurrence (position) of the string.
%1 = String to be found.
%2 = String to be
searched.
%3 = Result
0 = String not found
0 <> Found string
replace_str_in_str(%1,%2,%3) Replaces a string within a string.
%1 = String which
replaces the %2 string.
%2 = String to be
replaced.
%3 = Base String number.
$(%1) = Base string
insert_str_in_str(%1,%2,%3)
Inserts a string into a string.
%1 = Position to begin
insertion
%2 = Number of
characters to insert
%3 = Base String number
$(%1) = Base string
delete_str_in_str(%1,%2,%3)
Deletes a string from a string.
%1 = Base string number.
%2 = String number of
string to be deleted.
$(%1) = Base string.
get_string_length(%1,%2)
Determines the length of a string.
%1 = Base string number
%2 = String length
Содержание 1747-PBASE
Страница 1: ...BASIC Development Software Catalog Numbers 1747 PBASE Programming Manual ...
Страница 8: ...Publication 1746 PM001A US P Table of Contents vi ...
Страница 34: ...Publication 1746 PM001A US P 2 14 Getting Familiar with Your Development Software ...
Страница 72: ...Publication 1746 PM001A US P 5 8 Manipulating Files ...
Страница 88: ...Publication 1746 PM001A US P 6 16 Writing Programs Using the BASIC Development Language ...
Страница 143: ......