index

Varkon MBS Programmers manual


rstr - Function

Description

Converts a reference value to a string of characters with optional formatting.

Syntax

  s:=rstr(id, width);

  string s;
  ref    id;
  int    width;

Principal parameters

id - The value to convert.

Optional parameters

width - The number of character positions that will be used.
- If width is negative, characters will be left justified.
- If width is positive, characters will be right justified.
- If width is less than the characters needed, it is automatically increased.
- If width is larger than the characters needed, spaces are added.

Return value

A STRING value equal to the result of the conversion.

Examples

  id:=#5.2#7;

  s:=rstr(id);    ! Equal to s:="#5.2#7";

  s:=rstr(id,12)  ! Equal to s:="      #5.2#7";

  s:=rstr(id,-12) ! Equal to s:="#5.2#7      ";

See also

str()
SourceForge.net Logo

Varkon 1.19D svn # 120M