Home | Reviews | GUIpedia | Forum | Fun500
Brandon | Using REDIMIs it possible to use REDIM in a sub in FreeBASIC? For my sidebar I want the number of groups to be dynamic, it'd be better if I didn't have to force a set limit or somehow redim at launch. Does anyone have experience with redim? | 2009-12-05 | 10:00 AM |
Todd | Re:Using REDIMI know you can REDIM from the program. You may have to make the array SHARED in order to REDIM from a SUB or FUNCTION. Write a little program in FB to see if it works. | 2009-12-05 | 12:58 PM |
Brandon | Re:Using REDIMI tried that, it says something about not being able to redim in a sub if I use "REDIM SHARED" or something about the variable already existing if I don't use SHARED with REDIM. | 2009-12-05 | 1:17 PM |
pharoah | Re:Using REDIMYou could implement my list thing... it's pretty easy to change the size of a string from within a sub :). | 2009-12-05 | 4:41 PM |
Todd | Re:Using REDIMOr try a binary tree or linked list. | 2009-12-05 | 5:53 PM |
pharoah | Re:Using REDIMOh, this is FreeBASIC? Yeah, might as well use a linked list. There are a few implementations out there, search the FB forum. | 2009-12-05 | 6:38 PM |
Brandon | Re:Using REDIMYeah, I'm trying to start work on Fun500 6. | 2009-12-05 | 6:49 PM |
ksr | Re:Using REDIMI've had this issue before. Post your code, mine looks like this:
global code
[code]dim shared as file db()[/code]
function code
[code]
redim preserve as file db(newsize)
[/code] | 2009-12-06 | 4:29 PM |
Brandon | Re:Using REDIMI'll look at it again tomorrow, today I spent a lot of time looking in the CPU section here: http://redhill.net.au/ig.html It's quite informational. | 2009-12-06 | 5:29 PM |
GUIs
2021 Brandon Cornell