Do you remember when it just clicked into place?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

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

Post 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.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
programmerinprogress
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 632
Joined: Wed Oct 29, 2008 7:31 am
Current Project: some crazy stuff, i'll tell soon :-)
Favorite Gaming Platforms: PC
Programming Language of Choice: C++!
Location: The UK
Contact:

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

Post 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.
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D

I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

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

Post 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.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

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

Post 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:
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

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

Post 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.
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

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

Post 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???
Image
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

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

Post 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!)

:)
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
wtetzner
Chaos Rift Regular
Chaos Rift Regular
Posts: 159
Joined: Wed Feb 18, 2009 6:43 pm
Current Project: waterbear, GBA game + editor
Favorite Gaming Platforms: Game Boy Advance
Programming Language of Choice: OCaml
Location: TX
Contact:

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

Post 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.
The novice realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code.
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

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

Post 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....
Image
Post Reply