Search found 201 matches

by Juergen Kuehlwein
Aug 24, 2019 22:05
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

Do whatever is necessary to push things forward. One thought about presenting the array descriptor: - If you choose to make the array descriptor available by reference (return a pointer to the array descriptor), then this includes the possibility to modify the descriptor members by the user. I think...
by Juergen Kuehlwein
Aug 23, 2019 16:12
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

You could even make it one single (2 bit) flag, because the "states" are mutual exclusive: 0 = dynamic 1 = fixed dimensions, variable number of elements 2 = fixed size, fixed number of elements 3 = attached (only possible for former dynamic, so an attached array, which is reset, must becom...
by Juergen Kuehlwein
Aug 23, 2019 14:25
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

Or treat this kind of hybrid declaration (fixed number of dimensions, but variable number of elements) as a third variation of arrays (fix-len, var-len, fix-dim (?)) and reserve a flag bit for it.


JK
by Juergen Kuehlwein
Aug 23, 2019 13:17
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

@Jeff,

we cross posted.
What do you think about resetting dimensions too, after ERASE?

exactly what i mean. You don´t even need "ERASE" beforehand, "REDIM" (with an implicit ERASE, if the array is already dimmed) would do (for dynamic or "var-len" arrays).


JK
by Juergen Kuehlwein
Aug 23, 2019 13:12
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

You must not be allowed to redim or erase such an array Fxm is right! "Erase" could be misinterpreted in this context. I meant "erase" in a sense of deallocating memory. Thinking about it, the FBARRAY_FLAGS_DIMENSIONS member might be obsolete, as soon as we can decide between st...
by Juergen Kuehlwein
Aug 23, 2019 10:55
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

Static - dynamic: to my understanding a static (fixed size) array´s descriptor must not be changed at runtime. That is number of dimensions and number of elements must be static. You must not be allowed to redim or erase such an array. This allows for compile time optimization. A dynamic array curre...
by Juergen Kuehlwein
Aug 22, 2019 20:58
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

@Jeff, so you decided to expose the descriptor itself! Ok, no problem - this makes some of my functions obsolete, because you now can take the officially declared FBARRAY type. As already said above when you expand the FBARRAY type, add one or more "reserved" members. This gives room for f...
by Juergen Kuehlwein
Aug 20, 2019 16:23
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

... As datatype array(Any, Any) is somehow a hybrid for me. I can tell the number of dimensions beforehand, but i want to set the index bounds later. I suppose the compiler allocates two dimensions. This syntax definitely fixes the number of dimensions, so i wouldn´t call it dynamic. But for a dyna...
by Juergen Kuehlwein
Aug 20, 2019 15:20
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

Yes, that´s true. Fixed sized arrays get allocated a descriptor only for the dimensions needed. Dynamic arrays get always allocated room for 8 dimensions (and i would leave it this way at any rate). Currently the RTL cannot distinguish fixed sized from dynamic arrays. Therefore it doesn´t allow dyna...
by Juergen Kuehlwein
Aug 20, 2019 13:14
Forum: Community Discussion
Topic: New array features
Replies: 128
Views: 7713

Re: New array features

A new version fixing (hopefully) the "uppercase bug" i had is available as usual here . For testing you must exchange all binaries (as described above) + "array.bi" and "ustring.bi" with the new ones in the "new" folder. There is a file (documentation.txt) whi...
by Juergen Kuehlwein
Aug 20, 2019 12:45
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

A flag for fixed size arrays set by the compiler will do. Currently you can redim a fixed size array inside a procedure it has been passed to, because there is no information in the array descriptor (this is what actually is passed), if an array is of fixed size or dynamic. You simply cannot tell in...
by Juergen Kuehlwein
Aug 19, 2019 10:32
Forum: Community Discussion
Topic: New array features
Replies: 128
Views: 7713

Re: New array features

@ dodocat, uppercase - yes, that´s it. What a silly bug! I wouldn´t have found it, if you hadn´t helped me - thanks. I do some parameter parsing in "array.bi", and guess what, i do it in uppercase. At the very beginning of this project i installed a workaround making my "array(...&quo...
by Juergen Kuehlwein
Aug 19, 2019 9:00
Forum: Community Discussion
Topic: New array features
Replies: 128
Views: 7713

Re: New array features

@dodicat,

well, something must still be wrong!

So the line:

Code: Select all

n = array(scan, l, for(@userscan))
compiles and runs

What happens, if you omit "nocase", like this?

Code: Select all

array(sort, l)


And what happens if you make "nocase" uppercase, like this?

Code: Select all

array(sort, (l, NOCASE))



JK
by Juergen Kuehlwein
Aug 18, 2019 22:45
Forum: Community Discussion
Topic: New array features
Replies: 128
Views: 7713

Re: New array features

Thanks for testing! The errors indicate that the wrong compiler (not my version) is running. I don´t know how this can happen. Something must be wrong either with your installation or with your implementation (or my explanation for your installation or implementation, maybe i have overlooked somethi...
by Juergen Kuehlwein
Aug 18, 2019 20:08
Forum: Documentation
Topic: Array Descriptor (split from Wiki Improvements)
Replies: 99
Views: 2027

Re: Array Descriptor (split from Wiki Improvements)

Just another thought: Maybe we should add a new "dwsize" member to the new descriptor. Maybe in second place, because currently there is a data pointer, whose value must point to valid memory (> 65000), so if we read a value smaller than that but > 0, we know it´s our new size member and w...

Go to advanced search