Pointers
Posted: Wed Oct 10, 2012 12:05 am
Hello,
My name is Dima Dimov, I am a student at SJSU CA.
Cobra caught my interest as a clean syntax language. As such,I checked your documentation several times, and aside of passing a pointer to a function using a ref keyword, I could not find anything about doing sumething as follows:
c as int=5
q as int*=&c
Yes, I have translated the C,C++, int c=5; int* q=&c;
So the question boils down to, is it possible with cobra, and How?
The second question is as follows:
Are there facilities for manual memory management, or does a programmer merely reassigns the reference to a new object.
The "old" object being pointed to gets destroyed by Garbage collection.
Also, Is it possible to clear(memory wise(deallocate)) an array?
My name is Dima Dimov, I am a student at SJSU CA.
Cobra caught my interest as a clean syntax language. As such,I checked your documentation several times, and aside of passing a pointer to a function using a ref keyword, I could not find anything about doing sumething as follows:
c as int=5
q as int*=&c
Yes, I have translated the C,C++, int c=5; int* q=&c;
So the question boils down to, is it possible with cobra, and How?
The second question is as follows:
Are there facilities for manual memory management, or does a programmer merely reassigns the reference to a new object.
The "old" object being pointed to gets destroyed by Garbage collection.
Also, Is it possible to clear(memory wise(deallocate)) an array?