The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



CloneString


Unit: SDL_dstruct
Class: TStringStack
Declaration: function CloneString (ix: integer; var Str: string): integer;

The function CloneString retrieves the string stored on the stack at the index ix and copies it to the variable parameter Str. The parameter ix can assume values between 1 and NumEntries. The stack is not changed at all (in contrast to the Pop method).

Returned error codes:

 0 ... everything is OK
-1 ... the parameter ix is out of range

Hint: Note that the property NumEntries returns the top of the stack. Thus in order to retrieve the last string which was pushed to the stack without changing the stack pointer can be achieved by CloneString[NumEntries, Arr].



Last Update: 2023-Jul-07