12-18-2004, 07:41 PM
I'm pretty new to basic's but have been programming c/c++/java several years. I thought to try out FB just for fun.
First thing I did was to try out ptr_test.bas. I changed MAXNODES to 1000 and the program simply exited with output "result:"
I tried several values and found out that with MAXNODES=715 it ran just fine but with anything more it either generated windows errors or exited.
Seckond thing I tried out was dynamic memory allocation. I wanted to have a function that takes a int parameter and return a float array with given length. I tried several things but nothing worked. Probably because I had no documentation and compiler didn't generate any meaningful compile errors/warnings, also during runtime it exited with no error messages several times.
In conclusion I have two questions:
1)Why does the ptr_test.bas crash when bigger list is created?
2)How to make a function that returns a dynamically created variable?
First thing I did was to try out ptr_test.bas. I changed MAXNODES to 1000 and the program simply exited with output "result:"
I tried several values and found out that with MAXNODES=715 it ran just fine but with anything more it either generated windows errors or exited.
Seckond thing I tried out was dynamic memory allocation. I wanted to have a function that takes a int parameter and return a float array with given length. I tried several things but nothing worked. Probably because I had no documentation and compiler didn't generate any meaningful compile errors/warnings, also during runtime it exited with no error messages several times.
In conclusion I have two questions:
1)Why does the ptr_test.bas crash when bigger list is created?
2)How to make a function that returns a dynamically created variable?