LIST.Dump |
![]() ![]() |
text = LIST.Dump( lid AS HANDLE, lex AS INTEGER [=LS_All], delimiter AS STRING [=","] ) AS STRING
Returns the context of the list or specified List Element as a text string. Strings are enclosed with quotes, REFERENCES, HANDLES and MODULES are represented as Hex numbers (0x00000000 format). REAL numbers have at least one decimal. Each element (line) is terminated with a CHR( 13 ) + CHR( 10 ) pair.
To list the item names instead of the values, use LS_Header as the LEX.
Example:
DIM hList AS HANDLE
hList = LIST.Create( "Kalle", STRING, "Nisse", REAL, 4 )
LIST.At( hList, 0, 0, "Kalle Anka " ) LIST.At( hList, 0, 1, 1.234 ) LIST.At( hList, 1, 0, "Kajsa Anka " ) LIST.At( hList, 1, 1, 2.345 ) LIST.At( hList, 2, 0, "Joakim von Anka " ) LIST.At( hList, 2, 1, 3.456 ) LIST.At( hList, 3, 0, "Farmor Anka " ) LIST.At( hList, 3, 1, 4.567 )
' Print out the contents with a header
PRINT LIST.Dump( hList, LS_Header ), LIST.Dump( hList )
' Delete and Close the List
LIST.Delete( hList ) LIST.Close( hList )
END
|