|
From: Radek M. <rad...@gm...> - 2026-02-22 20:13:52
|
GLE does not support any array-like data type, however there is couple of workarounds I regularly use. You simply collect your data into some other container, like string or file. Simple example with integers: ``` sub get_value array$ index return val(seg$(array$, index, index)) end sub nums$ = "1234567890" for i = 1 to len(nums$) val = 10*get_value(nums$, i) print val next i ``` This example can be easily expanded to support multidimensional float data. The practicability and performance is obviously a different question. Regarding string as a container, there is I believe a limit to maximal length (which is relatively small if I am not mistaken), in that case, you can use file as a container, which seems more practical for what you try to do anyway. R.M. On neděle 22. února 2026 12:36:23, středoevropský standardní čas Andrey G. Grozin via Glx-general wrote: > ---------- Forwarded message ---------- > Date: Wed, 11 Feb 2026 10:53:06 +0700 (+07) > From: Andrey G. Grozin via Glx-devel <glx...@li...> > Reply-To: Andrey G. Grozin <A.G...@in...> > To: glx...@li... > Subject: [GLE-devel] arrays of lists? > > Hello *, > > Is it possible in gle to have something like an array or a list of real > numbers which could be addressed by an index? I'd like to write a > subroutine to draw generalized dashed lines: from 0 to x1 line, from x1 to > x2 gap, from x2 to x3 line, from x3 to x4 gap, ... (any number of x<i>). > > Andrey > > > _______________________________________________ > Glx-devel mailing list > Glx...@li... > https://lists.sourceforge.net/lists/listinfo/glx-devel > > > > _______________________________________________ > Glx-general mailing list > Glx...@li... > https://lists.sourceforge.net/lists/listinfo/glx-general |