Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Akow, TipmyPip, tomaslolo), 788 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: pointer problems. [Re: txesmi] #408737
10/06/12 11:58
10/06/12 11:58
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
well.. I have never really understood what pointers are and how to use them properly... smirk

Last edited by Kartoffel; 10/06/12 11:58.

POTATO-MAN saves the day! - Random
Re: pointer problems. [Re: Kartoffel] #408743
10/06/12 16:13
10/06/12 16:13
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline OP
Expert
FoxHound  Offline OP
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
There are not a lot of reasons you would want to use a variable as a pointer. In fact this is the first time I have ever needed to and this is getting on 10 years of programming for me. However now that I know I might find it more useful and use it far more often.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: pointer problems. [Re: FoxHound] #408750
10/06/12 17:51
10/06/12 17:51
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
There are tons of reasons to use a var as pointer, function calls by ref or by value are just one of them.
Guys, pointers are your bread and butter when working with C, and they will break your neck when you don't get them right (they will still do when you can get them right, but at least you can debug it then). So learn your goddamn pointers!


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: pointer problems. [Re: WretchedSid] #408751
10/06/12 18:43
10/06/12 18:43
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline OP
Expert
FoxHound  Offline OP
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
Other than the two examples provided, what else could they help with? Even the function call could be replaced with having the function return the value. I am being serious as I have not had a need for them before now.

It is quite helpful with my dashboard as it allows me to save about 1000 lines of code and makes it far more dynamic when using other items.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: pointer problems. [Re: FoxHound] #408752
10/06/12 19:03
10/06/12 19:03
Joined: Apr 2008
Posts: 650
Sajeth Offline
User
Sajeth  Offline
User

Joined: Apr 2008
Posts: 650
When you need to change two variables with a single function call, you're forced to use pointers.


Teleschrott-Fan.
Re: pointer problems. [Re: Sajeth] #408795
10/07/12 17:16
10/07/12 17:16
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline OP
Expert
FoxHound  Offline OP
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
That is true. I was not thinking of vars passed into functions, there are dozens of built in functions in 3dgs that we use all the time. I am more thinking of odd ways to use them, such as my dashboard example.


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1