Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Futurebasic/Language/Reference/str amp

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

STR& Syntax stringFromHandle$ = STR&(handle&, index%) 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 "STR#". The handle& should specify the location of the memory block. index% indicates which string element to get; the first element is numbered 1. If the handle isn't found, or if index% is greater than the number of strings in the resource, the STR& 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("This is number"+STR$(x), sHndl) NEXT // Display the handle using STR& FOR x = 1 TO 10   PRINT str&(sHndl,x) NEXT // We made it. We must dispose of it. DEF DISPOSEH(sHndl) See Also DEF APNDSTR; DEF REMOVESTR; COMPILE _strResource; STR#