Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

CSV$

Description

The CSV$ string function can be used, to generated a comma separated string from values, that are elements of a byte array. CSV is a widely accepted text format that is used e.g. for data interchange between different systems. CSV$ requires three arguments. The first argument is the name of a byte array that contains contiguous bytes which should be converted to CSV. The second argument is the starting offset where conversion should begin, and the last argument is the last offset, where CSV conversion should end. Both offsets are zero-based.

Example

This sample program creates an array of 100 bytes, sets element #2 to 123 and element #99 to 231. Then it uses CSV$ twice to convert different parts into CSV and prints the results.

outmode -2
dim a(100)
let a(2) = 123
let c$ = csv$ (a, 0, 4)
print c$
let a(99) = 231
let c$ = csv$ (a, 80, 99)
print c$

Remarks

 Please keep in mind that strings in the Avisaro Scripting Language must not exceed 255 bytes.