Futurebasic/Language/Reference/str amp

Revised
June 2001 (Release 5)

Description
This function returns a string element from a handle that is in the same format as a resource of type " ". The  should specify the location of the memory block. indicates which string element to get; the first element is numbered 1. If the handle isn't found, or if  is greater than the number of strings in the resource, the   function returns an empty (zero-length) string.

Example
This example creates and fills a handle in the form of a STR# resource and displays the results..

DIM sHndl as handle DIM x as WORD

// create an empty STR# style handle sHndl = FN newhandleclear(2)

// Fill the handle with ASCII strings (1-10)FOR x = 1 TO 10 DEF APNDSTR(&quot;This is number&quot;+STR$(x), sHndl)

NEXT

// Display the handle using STR&amp; FOR x = 1 TO 10 PRINT str&amp;(sHndl,x)

NEXT

// We made it. We must dispose of it.

DEF DISPOSEH(sHndl)