SDK Home Glossary Index Left Right Up

Descriptors


Section contents


Overview

Defined in

cdescriptor.oxh


Construction / destruction


NewDes - Constructor

Usage

this& = NewDes&:(buffer&,length&,maxLength&)

Description

Creates a descriptor object and returns a handle which allows the object to be manipulated.

Parameters
buffer& The address of the buffer which this descriptor will represent.
length& The used length of the buffer
maxLength& The maximum size of the buffer
Return Value
this& An value which represents the created descriptor
Error Handling

If the object could not be created then an error is generated which should be trapped by an ONERR handler.

Example
  LOCAL this&,length&,buffer&

  length& = 200
  buffer& = ALLOC(length&)
  this& = NewDes&:(buffer&,0,length&)
  DeleteDes:(this&) 

DeleteDes - Destructor

Usage

DeleteDes:(BYREF this&)

Description

Destroys the descriptor object.

Arguments
BYREF this& A handle to a descriptor
Example
  LOCAL this&,length&,buffer&

  length& = 200
  buffer& = ALLOC(length&)
  this& = NewDes&:(buffer&,0,length&)
  DeleteDes:(this&) 

Methods provided


DesAppend

Usage

DesAppend:(this&, des&)

Description

Appends the descriptor des& onto the end of the descriptor

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesAppendChar

Usage

DesAppendChar:(this&,char%)

Description

Appends a character onto the end of the descriptor.

Arguments
this& A handle to a descriptor
char% Value of the character to append to the descriptor

DesAppendFill

Usage

DesAppendFill:(this&,char%,length&)

Description

Appends the character char%, repeated length& times, to the buffer. An error will be generated if this function attempts to append more characters than will fit into the descriptor's buffer.

Arguments
this& A handle to a descriptor
char% Value of the character to fill the descriptor
length& The number of characters to fill.

DesAppendJustify

Usage

DesAppendJustify:(this&,des&,width&,align%,fill%)

Description

The data in des& is appended to the descriptor this&. The data is copied into a field which is width% characters wide and justified according to the parameter align%. Any remaining space is filled with the character whose value is specified by the fill% parameter.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
width& The width of the field or the default width.
align% The alignment type
fill% The value of the character to fill unused space

DesAppendJustifyStr

Usage

DesAppendJustifyStr:(this&,str$,width&,align%,fill%)

Description

The data in str$ is appended to the descriptor this&. The data is copied into a field which is width% characters wide and justified according to the parameter align%. Any remaining space is filled with the character whose value is specified by the fill% parameter.

Arguments
this& A handle to a descriptor
str$ The data to be copied
width& The width of the field or the default width.
align% The alignment type
fill% The value of the character to fill unused space

DesAppendNum

Usage

DesAppendNum:(this&,num&)

Description

Converts the long integer value to a decimal character representation and appends it to the descriptor's buffer.

Arguments
this& A handle to a descriptor
num& A long integer value

DesAppendNumFloat

Usage

DesAppendNumFloat:(this&,num,format&)

Description

The floating point value num is converted to a characters representation, using the conversion criteria specified in the RealFormat object handle&, and appends it to the descriptor's buffer.

Arguments
this& A handle to a descriptor
num A floating point value to append
format& A handle to a RealFormat object

DesAppendNumRadix

Usage

DesAppendRadix:(this&,num&,radix&)

Description

Converts the long integer value, using as a base radix&, to a decimal character representation and appends it to the descriptor's buffer. Any alphabetic characters in the resulting number will be in lower case.

Arguments
this& A handle to a descriptor
num& A long integer value to append
radix& The base used to convert the value

DesAppendNumRadixUC

Usage

DesAppendNumRadixUC:(this&,num&,radix&)

Description

Converts the long integer value, using as a base radix&, to a decimal character representation and appends it to the descriptor's buffer. Any alphabetic characters in the resulting number will be upper case.

Arguments
this& A handle to a descriptor
num& A long integer value to append
radix& The base used to convert the value

DesAppendStr

Usage

DesAppendStr:(this&, str$)

Description

Appends the string onto the end of the descriptor

Arguments
this& A handle to a descriptor
str$ The string to be appended

DesAt

Usage

value% =DesAt%:(this&,pos&)

Description

This function returns a single character from the descriptors buffer.

Arguments
this& A handle to a descriptor
pos& The position from which to extract the data from the descriptor. The value can range from 0 <= pos& < current length of the descriptor.
Return value
value% The value of the character extracted.

DesCapitalize

Usage

DesCapitalize:(this&)

Description

Converts the first character in the descriptor to uppercase.

Arguments
this& A handle to a descriptor

DesCollate

Usage

DesCollate:(this&)

Description

Removes the difference between characters that are deemed unimportant for the purpose of ordering characters into their collating sequence.

Arguments
this& A handle to a descriptor

DesCompare

Usage

result% = DesCompare%:(this&,des&)

Description

Compares the contents of the descriptor this& with the contents of the string str$ on a byte by byte basis.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Positive, if this& is greater than des&.
Zero, if this& and des& have the same length and contents
Negative, if this& is less than des&
See also

DesCompareC, DesCompareF


DesCompareC

Usage

result% = DesCompareC%:(this&,des&)

Description

Compares the collated contents of the descriptors.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Positive, if this& is greater than des$.
Zero, if this& and des$ have the same length and contents
Negative, if this& is less than des$
See also

DesCompare, DesCompareF


DesCompareF

Usage

result% = DesCompareF%:(this&,des&)

Description

Compares the folded contents of the descriptors.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Positive, if this& is greater than des$.
Zero, if this& and des$ have the same length and contents
Negative, if this& is less than des$
See also

DesCompare, DesCompareC


DesCompareStr

Usage

result% = DesCompareStr%:(this&,str$)

Description

Compares the contents of the descriptor this& with the contents of the string str$ on a byte by byte basis.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Positive, if this& is greater than str&.
Zero, if this& and str& have the same length and contents
Negative, if this& is less than str&
See also

DesCompareC, DesCompareF


DesCompareStrC

Usage

result% = DesCompareStrC%:(this&,str$)

Description

Compares the collated contents of the descriptors.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Positive, if this& is greater than str$.
Zero, if this& and str$ have the same length and contents
Negative, if this& is less than str$
See also

DesCompare, DesCompareF


DesCompareStrF

Usage

result% = DesCompareStrF%:(this&,str$)

Description

Compares the folded contents of the descriptors.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Positive, if this& is greater than str$.
Zero, if this& and str$ have the same length and contents
Negative, if this& is less than str$
See also

DesCompare, DesCompareC


DesCopy

Usage

DesCopy:(this&,des&)

Description

The contents of the descriptor des& is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of des& is greater then the maximum length of this&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesCopyC

Usage

DesCopyC:(this&,des&)

Description

The contents of the descriptor des& is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of des& is greater then the maximum length of this&. The contents of des& are collated before coping them into this&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesCopyCP

Usage

DesCopyCP:(this&,des&)

Description

The contents of the descriptor des& is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of des& is greater then the maximum length of this&. The first character of des& is converted to uppercase and the remaining characters converted to lowercase before coping them into this&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesCopyF

Usage

DesCopyF:(this&,des&)

Description

The contents of the descriptor des& is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of des& is greater then the maximum length of this&. The contents of des& are folded before coping them into this&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesCopyLC

Usage

DesCopyLC:(this&,des&)

Description

The contents of the descriptor des& is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of des& is greater then the maximum length of this&. The contents of des& are converted to lowercase before coping them into this&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesCopyUC

Usage

DesCopyUC:(this&,des&)

Description

The contents of the descriptor des& is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of des& is greater then the maximum length of this&. The contents of des& are converted to uppercase before coping them into this&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesCopyStr

Usage

DesCopyStr:(this&,str$)

Description

The contents of the string str$ is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of str$ is greater then the maximum length of this&.

Arguments
this& A handle to a descriptor
str$ A string to copy into the descriptor's buffer

DesCopyStrC

Usage

DesCopyStrC:(this&,str$)

Description

The contents of the string str$ is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of str$ is greater then the maximum length of this&. The contents of str$ are collated before coping them into this&.

Arguments
this& A handle to a descriptor
str$ A string to copy into the descriptor's buffer

DesCopyStrCP

Usage

DesCopyStrCP:(this&,str$)

Description

The contents of the string str$ is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of str$ is greater then the maximum length of this&. The first character of str$ is converted to uppercase and the remaining characters converted to lowercase before coping them into this&.

Arguments
this& A handle to a descriptor
str$ A string to copy into the descriptor's buffer

DesCopyStrF

Usage

DesCopyStrF:(this&,str$)

Description

The contents of the string str$ is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of str$ is greater then the maximum length of this&. The contents of str$ are folded before coping them into this&.

Arguments
this& A handle to a descriptor
str$ A string to copy into the descriptor's buffer

DesCopyStrLC

Usage

DesCopyStrLC:(this&,str$)

Description

The contents of the string str$ is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of str$ is greater then the maximum length of this&. The contents of str$ are converted to lowercase before coping them into this&.

Arguments
this& A handle to a descriptor
str$ A string to copy into the descriptor's buffer

DesCopyStrUC

Usage

DesCopyStrUC:(this&,str$)

Description

The contents of the string str$ is copied into this& descriptor replacing the existing data in the descriptor. A error will be generated if the length of str$ is greater then the maximum length of this&. The contents of str$ are converted to uppercase before coping them into this&.

Arguments
this& A handle to a descriptor
str$ A string to copy into the descriptor's buffer

DesDelete

Usage

DesDelete:(this&,pos&,length&)

Description

Deletes data from the descriptor.

Arguments
this& A handle to a descriptor
pos& The position from which to start deletion of the data from the descriptor.
The value can range from 0 <= pos& < current length of the descriptor.
length& The number of bytes to extract.
The value must not be negative or greater than the current length of the descriptor when added to pos&.

DesEQ

Usage

result% = DesEQ%:(this&,des&)

Description

Compares the descriptor this& with the descriptor des& for equality.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Zero, if the descriptors are not equal
Non-Zero, if the descriptors are equal
See also

DesCompare, DesCompareC, DesCompareF, DesGE, DesGT, DesLE, DesLT, DesNE


DesEQStr

Usage

result% = DesEQStr%:(this&,str$)

Description

Compares the descriptor this& with the string str$ for equality.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Zero, if the descriptors are not equal
Non-Zero, if the descriptors are equal
See also

DesCompare, DesCompareC, DesCompareF, DesGE, DesGT, DesLE, DesLT, DesNE


DesFill

Usage

DesFill:(this&,char%)

Description

Fills every character in the descriptor's buffer with the character char%.

Arguments
this& A handle to a descriptor
char% A character value

DesFillLen

Usage

DesFillLen:(this&,char%,length&)

Description

Fills the descriptor's buffer with the length& characters char%, starting at the beginning of the buffer.

Arguments
this& A handle to a descriptor
char% A character value
length& Length to be filled

DesFillZ

Usage

DesFillZ:(this&)

Description

Fills the used part of the buffer with zeros. The used length of the buffer is left unchanged.

Arguments
this& A handle to a descriptor

DesFillZLen

Usage

DesFillZLen:(this&,length&)

Description

The buffer is filled with length& characters whose value is zero. The current udes length is set to length&.

Arguments
this& A handle to a descriptor
length& Length of buffer to set to zero

DesFind

Usage

pos& = DesFind&:(this&,des&)

Description

Searches the descriptor this& for the location which matches the contents of the descriptor des&.

Note that if the length of des& is zero then the value 0 will be returned.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
pos& The offset into the descriptor's buffer where the descriptor des& was found, or -1 if it was not found
See also

DesFindC, DesFindF


DesFindC

Usage

pos& = DesFindC&:(this&,des&)

Description

Searches the descriptor this& for the location which matches the contents of the descriptor des&. The contents of this& and des& are collated during the matching process.

Note that if the length of des& is zero then the value 0 will be returned.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
pos& The offset into the descriptor's buffer where the descriptor des& was found, or -1 if it was not found
See also

DesFind, DesFindF


DesFindF

Usage

pos& = DesFindF&:(this&,des&)

Description

Searches the descriptor this& for the location which matches the contents of the descriptor des&. The contents of this& and des& are folded during the matching process.

Note that if the length of des& is zero then the value 0 will be returned.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
pos& The offset into the descriptor's buffer where the descriptor des& was found, or -1 if it was not found
See also

DesFind, DesFindC


DesFindStr

Usage

pos& = DesFindStr&:(this&,str$)

Description

Searches the descriptor this& for the location which matches the contents of the string str$.

Note that if the length of str$ is zero then the value 0 will be returned.

Arguments
this& A handle to a descriptor
str$ A string to find
Return value
pos& The offset into the descriptor's buffer where the string was found, or -1 if it was not found
See also

DesFindC, DesFindF


DesFindStrC

Usage

pos& = DesFindStrC&:(this&,str$)

Description

Searches the descriptor this& for the location which matches the contents of the string str$. The contents of this& and str$ are collated during the matching process.

Note that if the length of des& is zero then the value 0 will be returned.

Arguments
this& A handle to a descriptor
str$ A string to find
Return value
pos& The offset into the descriptor's buffer where the string was found, or -1 if it was not found
See also

DesFind, DesFindF


DesFindStrF

Usage

pos& = DesFindStrF&:(this&,str$)

Description

Searches the descriptor this& for the location which matches the contents of the string str$. The contents of this& and str$ are folded during the matching process.

Note that if the length of des& is zero then the value 0 will be returned.

Arguments
this& A handle to a descriptor
str$ A string to find
Return value
pos& The offset into the descriptor's buffer where the string was found, or -1 if it was not found
See also

DesFind, DesFindC


DesFold

Usage

DesFold:(this&)

Description

removes the difference between characters that are deemed unimportant for the purposes of inexact or case-insensitive matching. As well as ignoring difference in case, folding ignores any accent on a character.

Arguments
this& A handle to a descriptor

DesGE

Usage

result% = DesGE%:(this&,des&)

Description

Compares whether the descriptor this& is greater or equal to the descriptor des&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Zero, if this& < str$
Non-zero, if this& >= str$
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGT, DesLE, DesLT, DesNE


DesGEStr

Usage

result% = DesGEStr%:(this&,str$)

Description

Compares whether the descriptor this& is greater or equal to the string str$.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Zero, if this& < str$
Non-zero, if this& >= str$
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGT, DesLE, DesLT, DesNE


DesGT

Usage

result% = DesGT%:(this&,des&)

Description

Compares whether the descriptor this& is greater the descriptor des&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Zero, if this& <= str$
Non-zero, if this& > str$
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGE, DesLE, DesLT, DesNE


DesGTStr

Usage

result% = DesGTStr%:(this&,str$)

Description

Compares whether the descriptor this& is greater the string str$.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Zero, if this& <= str$
Non-zero, if this& > str$
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGE, DesLE, DesLT, DesNE


DesInsert

Usage

DesInsert:(this&,pos&,des&)

Description

Inserts the contents of the descriptor des& into the buffer of descriptor this& at position pos&.

Arguments
this& A handle to a descriptor
pos& The offset into the descriptor's buffer where the descriptor des& is inserted
des& A handle to a descriptor

DesInsertStr

Usage

DesInsertStr:(this&,pos&,str$)

Description

Inserts the contents of the string str$ into the buffer of descriptor this& at position pos&.

Arguments
this& A handle to a descriptor
pos& The offset into the descriptor's buffer where the string is inserted
str$ A string to insert

DesJustify

Usage

DesJustify:(this&,des&,width&,align%,fill%)

Description

The data in des& is copied into the descriptor this&. The data is copied into a field which is width% characters wide and justified according to the parameter align%. Any remaining space is filled with the character whose value is specified by the fill% parameter.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
width& The width of the field or the default width.
align% The alignment type
fill% The value of the character to fill unused space

DesJustifyStr

Usage

DesJustifyStr:(this&,str$,width&,align%,fill%)

Description

The data in str$ is copied into the descriptor this&. The data is copied into a field which is width% characters wide and justified according to the parameter align%. Any remaining space is filled with the character whose value is specified by the fill% parameter.

Arguments
this& A handle to a descriptor
str$ The data to be copied
width& The width of the field or the default width.
align% The alignment type
fill% The value of the character to fill unused space

DesLE

Usage

result% = DesLE%:(this&,des&)

Description

Compares whether the descriptor this& is less than or equal to the descriptor des&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Zero, if this& > str$
Non-zero, if this& <= str$
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGE, DesGT, DesLT, DesNE


DesLeft

Usage

str$ = DesLeft$:(this&,len&)

Description

This function is used to extract the left len& bytes from the descriptor des&.

Arguments
this& A handle to a descriptor
len& The number of bytes to extract. The value must not be negative, greater than the current length of the descriptor or exceed the value KMaxStringLen%.
Return value
str$ The data extracted from the descriptor
Error Handling

If the str$ string cannot be created then an error is generated which should be trapped by an ONERR handler.

See also

DesMid, DesRight


DesLength

Usage

length& = DesLength&:(this&)

Description

This function returns the used part of the descriptor buffer.

Arguments
this& A handle to a descriptor
Return value
length& Length of the used part of the descriptor's buffer

DesLEStr

Usage

result% = DesLEStr%:(this&,str$)

Description

Compares whether the descriptor this& is less than or equal to the string str$.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Zero, if this& > str$
Non-zero, if this& <= str$
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGE, DesGT, DesLT, DesNE


DesLocate

Usage

pos& = DesLocate&:(this&,char%)

Description

Searches the contents of the descriptor this& for the first occurrence of the character char%.

Arguments
this& A handle to a descriptor
char% The character to locate
Return value
pos& The offset into the descriptor's buffer where the character was found, or -1 if it was not found.
See also

DesLocateF, DesLocateReverse, DesLocateReverseF


DesLocateF

Usage

pos& = DesLocateF&:(this&,char%)

Description

Searches the contents of the descriptor this& for the first occurrence of the character char%.after they have been folded.

Arguments
this& A handle to a descriptor
char% The character to locate
Return value
pos& The offset into the descriptor's buffer where the character was found, or -1 if it was not found.
See also

DesLocate, DesLocateReverse, DesLocateReverseF


DesLocateReverse

Usage

pos& = DesLocateReverse&:(this&,char%)

Description

Searches the contents of the descriptor this& for the last occurrence of the character char%.

Arguments
this& A handle to a descriptor
char% The character to locate
Return value
pos& The offset into the descriptor's buffer where the character was found, or -1 if it was not found.
See also

DesLocate, DesLocateF, DesLocateReverseF


DesLocateReverseF

Usage

pos& = DesLocateReverseF&:(this&,char%)

Description

Searches the contents of the descriptor this& for the last occurrence of the character char%.after they have been folded.

Arguments
this& A handle to a descriptor
char% The character to locate
Return value
pos& The offset into the descriptor's buffer where the character was found, or -1 if it was not found.
See also

DesLocate, DesLocateF, DesLocateReverse


DesLowerCase

Usage

DesLowerCase:(this&)

Description

Converts the characters in the buffer to lowercase.

Arguments
this& A value previously returned by NewDest

DesLT

Usage

result% = DesLT%:(this&,des&)

Description

Compares whether the descriptor this& is less than the descriptor des&.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Zero, if this& >= des&
Non-zero, if this& < des&
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGE, DesGT, DesLE, DesNE


DesLTStr

Usage

result% = DesLT%:(this&,str$)

Description

Compares whether the descriptor this& is less than the descriptor des&.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Zero, if this& >= des&
Non-zero, if this& < des&
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGE, DesGT, DesLE, DesNE


DesMatch

Usage

pos& = DesMatch&:(this&,des&)

Description

Compares the match pattern in the descriptor des& with the contents of the descriptor this&. If the match pattern contains '*' it matches zero or more characters. If the match pattern contains '?' it matches any character.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
pos& The offset into the descriptor's buffer where the match was made, or -1 if it was not matched
See also

DesMatchC, DesMatchF


DesMatchC

Usage

pos& = DesMatchC&:(this&,des&)

Description

Compares the match pattern in the descriptor des& with the contents of the descriptor this&. If the match pattern contains '*' it matches zero or more characters. If the match pattern contains '?' it matches any character. The contents of the buffers are collated for the purposes of the matching process.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
pos& The offset into the descriptor's buffer where the match was made, or -1 if it was not matched
See also

DesMatch, DesMatchF


DesMatchF

Usage

pos& = DesMatchF&:(this&,des&)

Description

Compares the match pattern in the descriptor des& with the contents of the descriptor this&. If the match pattern contains '*' it matches zero or more characters. If the match pattern contains '?' it matches any character. The contents of the buffers are folded for the purposes of the matching process.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
pos& The offset into the descriptor's buffer where the match was made, or -1 if it was not matched
See also

DesMatch, DesMatchC


DesMatchStr

Usage

pos& = DesMatchStr&:(this&,str$)

Description

Compares the match pattern in the string str$ with the contents of the descriptor this&. If the match pattern contains '*' it matches zero or more characters. If the match pattern contains '?' it matches any character.

Arguments
this& A handle to a descriptor
str$ A string to match
Return value
pos& The offset into the descriptor's buffer where the match was made, or -1 if it was not matched
See also

DesMatchC, DesMatchF


DesMatchStrC

Usage

pos& = DesMatchStrC&:(this&,str$)

Description

Compares the match pattern in the string str$ with the contents of the descriptor this&. If the match pattern contains '*' it matches zero or more characters. If the match pattern contains '?' it matches any character. The contents of the buffers are collated for the purposes of the matching process.

Arguments
this& A handle to a descriptor
str$ A string to match
Return value
pos& The offset into the descriptor's buffer where the match was made, or -1 if it was not matched
See also

DesMatch, DesMatchF


DesMatchStrF

Usage

pos& = DesMatchStrF&:(this&,str$)

Description

Compares the match pattern in the string str$ with the contents of the descriptor this&. If the match pattern contains '*' it matches zero or more characters. If the match pattern contains '?' it matches any character. The contents of the buffers are folded for the purposes of the matching process.

Arguments
this& A handle to a descriptor
str$ A string to match
Return value
pos& The offset into the descriptor's buffer where the match was made, or -1 if it was not matched
See also

DesMatch, DesMatchC


DesMaxLength

Usage

length& = DesMaxLength&:(this&)

Description

Returns the maximum length of data that the descriptor can hold in its buffer.

Arguments
this& A handle to a descriptor
Return Value
length& The maximum length of the descriptor

DesMid

Usage

str$ = DesMid$:(this&,pos&,len&)

Description

This function is used to extract len& bytes from the descriptor des& starting at the position pos&.

Arguments
this& A handle to a descriptor
pos& The position from which to start extraction of the data from the descriptor.
The value can range from 0 <= pos& < current length of the descriptor.
len& The number of bytes to extract.
The value must not be negative, greater than the current length of the descriptor when added to pos& or exceed the value KMaxStringLen%.
Return value
str$ The data extracted from the descriptor
Error Handling

If the str$ string cannot be created then an error is generated which should be trapped by an ONERR handler.

See also

DesLeft, DesRight


DesNE

Usage

result% = DesNE%:(this&,des&)

Description

Compares the descriptor this& with the descriptor des& for inequality.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor
Return value
result% Zero, if the descriptors are equal
Non-Zero, if the descriptors are not equal
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGE, DesGT, DesLE, DesLT


DesNEStr

Usage

result% = DesNEStr%:(this&,str$)

Description

Compares the descriptor this& with the string str$ for inequality.

Arguments
this& A handle to a descriptor
str$ A string to compare
Return value
result% Zero, if the descriptors are equal
Non-Zero, if the descriptors are not equal
See also

DesCompare, DesCompareC, DesCompareF, DesEQ, DesGE, DesGT, DesLE, DesLT


DesNum

Usage

DesNum:(this&,num&)

Description

Converts the long integer value to a decimal character representation and copies it into the descriptor's buffer.

Arguments
this& A handle to a descriptor
num& A long integer value

DesNumFloat

Usage

DesNumFloat:(this&,num,format&)

Description

The floating point value num is converted to a characters representation, using the conversion criteria specified in the RealFormat object handle&, and copies it into the descriptor's buffer.

Arguments
this& A handle to a descriptor
num A floating point value
format& A handle to a RealFormat object

DesNumRadix

Usage

DesNumRadix:(this&,num&,radix&)

Description

Converts the long integer value, using as a base radix&, to a decimal character representation and copies it into the descriptor's buffer. Any alphabetic characters in the resulting number will be in lowercase.

Arguments
this& A handle to a descriptor
num& A long integer value
radix& The base used to convert the value

DesNumRadixUC

Usage

DesNumRadixUC:(this&,num&,radix&)

Description

Converts the long integer value, using as a base radix&, to a decimal character representation and copies it into the descriptor's buffer. Any alphabetic characters in the resulting number will be in uppercase.

Arguments
this& A handle to a descriptor
num& A long integer value
radix& The base used to convert the value

DesRepeat

Usage

DesRepeat:(this&,des&)

Description

The descriptor des& is repeatedly copied into the descriptor this& up to the current length of the descriptor.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesRepeatStr

Usage

DesRepeatStr:(this&,str$)

Description

The string str$ is repeatedly copied into the descriptor this& up to the current length of the descriptor.

Arguments
this& A handle to a descriptor
str$ A string to copy

DesReplace

Usage

DesReplace:(this&,pos&,length&,des&)

Description

Replaces length& characters in the descriptor this&, starting at the offset pos&, with the contents of the descriptor des&.

Arguments
this& A handle to a descriptor
pos& The position at which to start the replace
length& The number of characters to replace
des& A handle to a descriptor

DesReplaceStr

Usage

DesReplaceStr:(this&,pos&,length&,str$)

Description

Replaces length& characters in the descriptor this&, starting at the offset pos&, with the contents of the string str$.

Arguments
this& A handle to a descriptor
pos& The position at which to start the replace
length& The number of characters to replace
str$ A string

DesRight

Usage

str$ = DesRight$:(this&,len&)

Description

This function is used to extract the right len& bytes from the descriptor des&.

Arguments
this& A handle to a descriptor
len& The number of bytes to extract. The value must not be negative, greater than the current length of the descriptor or exceed the value KMaxStringLen%.
Error Handling

If the str$ string cannot be created then an error is generated which should be trapped by an ONERR handler.

Return value
str$ The data extracted from the descriptor
See also

DesLeft, DesMid


DesSet

Usage

DesSet:(this&,buffer&,length&,maxLength&)

Description

(Re-)sets the buffer, current used length and maximum length of the descriptor.

Arguments
this& A handle to a descriptor
buffer& The address of the buffer which this descriptor will represent
length& The used length of the buffer
maxLength& The maximum size of the buffer

DesSetLength

Usage

DesSetLength:(this&,length&)

Description

Sets the current length of the descriptor.

Arguments
this& A handle to a descriptor
length& The length to set

DesSetMax

Usage

DesSetMax:(this&)

Description

Sets the length of the descriptor ot its maximum value

Arguments
this& A handle to a descriptor

DesStr

Usage

str$ = DesStr$:(this&)

Description

Returns the data in the descriptor's buffer.

Warning: This function must only be used on descriptors whose used length is KMaxStringLen% (256) or less in length.

Arguments
this& A handle to a descriptor
Return Value
str$ The data extracted from the descriptor
Error Handling

If the str$ string cannot be created then an error is generated which should be trapped by an ONERR handler.


DesSwap

Usage

DesSwap:(this&,des&)

Description

Swaps the contents of the 2 descriptors.

Arguments
this& A handle to a descriptor
des& A handle to a descriptor

DesTrim

Usage

DesTrim:(this&)

Description

Deletes space characters from the start and end of the descriptor's buffer and reduces any remaining multiple spaces to single spaces.

Arguments
this& A handle to a descriptor

DesTrimAll

Usage

DesTrimAll:(this&)

Description

Deletes space characters from the start and end of the descriptor's buffer.

Arguments
this& A handle to a descriptor

DesTrimLeft

Usage

DesTrimLeft:(this&)

Description

Deletes all the space characters at the start of the descriptor's buffer.

Arguments
this& A handle to a descriptor

DesTrimRight

Usage

DesTrimRight:(this&)

Description

Deletes the space characters at the end of the descriptor's buffer.

Arguments
this& A handle to a descriptor

DesUpperCase

Usage

DesUpperCase:(this&)

Description

Converts the contents of the buffer to uppercase.

Arguments
this& A handle to a descriptor

DesZero

Usage

DesZero:(this&)

Description

Sets the length of the descriptor to zero.

Arguments
this& A handle to a descriptor

DesZeroTerminate

Usage

DesZeroTerminate:(this&)

Description

Writes a zero byte onto the end of the contents of the buffer. The current used length is unchanged.

Arguments
this& A handle to a descriptor

  SDK Home Glossary Index Left Right Up