Page 2 of 2

Re: Do you remember when it just clicked into place?

Posted: Fri Mar 13, 2009 12:29 pm
by avansc
programmerinprogress wrote:Yeah, I sorta flicked through google, typed in "Pointers Visual Basic", and I did get some results, but they hardly qualify as an integral aspect of the Visual Basic Programming language, they sorta just 'added it in'

Under closer inspection, I noticed VB.NET CAN use pointers, but i've never used that (not much anyway) so nevermind.
pointers arent integral to any programming language. its a feature. and they dont just sorta added it in.
VB is a Superset of BASIC, which was one of the most powerful and popuar languages of its time. i my self dont like it, i was brough up on pascal.
but the point is that pointers in basic are just as much a part of the langauge as they are in C/C++ and they are just as powerful.

Re: Do you remember when it just clicked into place?

Posted: Fri Mar 13, 2009 2:00 pm
by programmerinprogress
Then I gracefully retract my statement :)

I've never really used pointers in Vb, so i've never really considered them a feature of the language, but if they're there, they're there, and theres no denying that.

Re: Do you remember when it just clicked into place?

Posted: Fri Mar 13, 2009 2:51 pm
by avansc
programmerinprogress wrote:Then I gracefully retract my statement :)

I've never really used pointers in Vb, so i've never really considered them a feature of the language, but if they're there, they're there, and theres no denying that.
its cool, for the longest time i also thought that pascal didnt have pointers, but they are there.

Re: Do you remember when it just clicked into place?

Posted: Fri Mar 13, 2009 7:40 pm
by dandymcgee
avansc wrote:
programmerinprogress wrote:Then I gracefully retract my statement :)

I've never really used pointers in Vb, so i've never really considered them a feature of the language, but if they're there, they're there, and theres no denying that.
Hmm, I read somewhere VB's pointers aren't really built in but you can make pointers using the Win32 API? I don't really know anything about it, because I have no need for pointers in VB. From a quick google search for example code it looks pretty ugly.. :roll:

Re: Do you remember when it just clicked into place?

Posted: Sat Mar 14, 2009 6:55 am
by RyanPridgeon
MadPumpkin wrote:

Code: Select all

if (shoulderIsSucked=true){
     function figureItOut{
          getTheDamnThingOffYourShoulder();
          shoulderIsSucked=false;
          gotoAndStop(2, true);
     }
}
That would not work. You are only declaring the function, not actually calling it...

ALso you used = instead of ==. Also when declaring the function, you need to put () before the {

Unless thats what you wanted to do. But that's a very weird way of doing things.

Re: Do you remember when it just clicked into place?

Posted: Fri Mar 20, 2009 12:03 pm
by eatcomics
programmerinprogress wrote:Pointers were definately something I wrestled with, it took me a while to wrap my head around using a variable to locate another variable in the memory, but now i'm able to build up a picture in my head of how it would work.

that's how I come up with my algorithms, I see things (somethimes ridiculous representations, but nonetheless rather accurate) mentally, I usually think about how something should work, then try and break it down into simple operations, then turn that into code!

My BLOCK project helped me a great deal, firstly it taught me to find solutions if I hit a 'brick wall', it also taught me that you can't be ignorant to certain aspects of programming, and then indulge in using other ones.

Programming is about perseverence, and patience, there is no room for complacency, you have to keep working if you want to get anywhere, so I definately agree that with programming you learn by putting what you've learnt into practice, and pushing the boundaries of your current knowledge, to achieve your goals.
everyone has trouble with pointers... I'm still working on it.... But I have the basics... Why would you need a pointer to a pointer???

Re: Do you remember when it just clicked into place?

Posted: Fri Mar 20, 2009 3:42 pm
by MarauderIIC
One reason would be so that you can tell the original pointer to point at NULL. If you have a pointer to myClass (say myClass* poriginal) and you have a fn that takes myClass* arg and you use arg to delete myClass, poriginal is now pointing at garbage (because 'poriginal' was passed by value :D wrap your head around that last sentence, haha!)

:)

Re: Do you remember when it just clicked into place?

Posted: Sat Mar 21, 2009 12:16 am
by wtetzner
MarauderIIC wrote:One reason would be so that you can tell the original pointer to point at NULL. If you have a pointer to myClass (say myClass* poriginal) and you have a fn that takes myClass* arg and you use arg to delete myClass, poriginal is now pointing at garbage (because 'poriginal' was passed by value :D wrap your head around that last sentence, haha!)

:)
Also an array of pointers would be a pointer to a pointer.

Re: Do you remember when it just clicked into place?

Posted: Sat Mar 21, 2009 11:00 pm
by eatcomics
MarauderIIC wrote:One reason would be so that you can tell the original pointer to point at NULL. If you have a pointer to myClass (say myClass* poriginal) and you have a fn that takes myClass* arg and you use arg to delete myClass, poriginal is now pointing at garbage (because 'poriginal' was passed by value :D wrap your head around that last sentence, haha!)

:)
Yeah that last one got me... I think I see what you're saying though....