Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 9,630 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: 0 == NULL ??? [Re: EvilSOB] #278272
07/12/09 21:30
07/12/09 21:30
Joined: Aug 2005
Posts: 1,230
M
MichaelGale Offline
Serious User
MichaelGale  Offline
Serious User
M

Joined: Aug 2005
Posts: 1,230
I found this post on a forum: http://c.ittoolbox.com/groups/technical-...342?cv=expanded about the topic that explains the difference between 0 and (void*)0. I guess with Lite-C we are somewhere in the middle.


Your friendly mod is at your service.
Re: 0 == NULL ??? [Re: MichaelGale] #278289
07/12/09 23:36
07/12/09 23:36
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I think we are more (IMHO) going to be C++ compatible.
Straight C is too 'outdated'.
Im not saying its obsolete, it still has priide of place as a
REALLY low level language, but its not that often you need to go
that low any more.
Escpecially not with a propriety gaming engine, for "non-professional" programmers...
It IS called LITE-c after all.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: 0 == NULL ??? [Re: EvilSOB] #278324
07/13/09 06:37
07/13/09 06:37
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
I think NULL has to be handled the way it is in Java.

How could I check the parameter in my example code (http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=277189#Post277189) if it is set or not as long as NULL is the same as 0?


Last edited by pegamode; 07/13/09 06:38.
Re: 0 == NULL ??? [Re: pegamode] #278332
07/13/09 07:34
07/13/09 07:34
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
You cant, cause you are passing it as a value, not a pointer.
If you passed it as a pointer, your problem would not occur.

And NULl should not be handled the way it is in java, simply because
this it lite-C, not LITE-JAVA. This is the way its handled in C++
so thats why its used here.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: 0 == NULL ??? [Re: EvilSOB] #278338
07/13/09 08:12
07/13/09 08:12
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Originally Posted By: EvilSOB
Im not saying its obsolete, it still has priide of place as a
REALLY low level language, but its not that often you need to go
that low any more.


I highly disagree.
In my job, straight C is used, and there are no plans to switch to C++ or something else anytime soon.
The reason is memory consumption and runtime.

Re: 0 == NULL ??? [Re: FBL] #278342
07/13/09 08:42
07/13/09 08:42
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I wont disagree Firoball, thats just my opinion based on my experiences
over the last 10 years (on and off) as an "application" level programmer.
I havent come across C as often as C++ or 'higher' languages.
But maybe thats cause Im not close to prefessional level with straight C,
and so have overlooked a lot of it, as I havent been looking in that direction.

So what do you programs do roughly speaking (if I may ask)?
PC operating system, hardware control, or all the way down at lowly
end-user "applications" stuff?


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: 0 == NULL ??? [Re: EvilSOB] #278360
07/13/09 09:40
07/13/09 09:40
Joined: Jul 2000
Posts: 28,149
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,149
Frankfurt
NULL == 0. C++ is the most often used language in game development, thus we're following the C++ convention. Besides, if NULL were not 0, you could not easily use longs or vars for pointers, and had all sorts of type conversion issues that beginners really don't want to have with a new language.

Re: 0 == NULL ??? [Re: EvilSOB] #278369
07/13/09 10:35
07/13/09 10:35
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Originally Posted By: EvilSOB

So what do you programs do roughly speaking (if I may ask)?
PC operating system, hardware control, or all the way down at lowly
end-user "applications" stuff?


Embedded systems.

Re: 0 == NULL ??? [Re: FBL] #278378
07/13/09 11:53
07/13/09 11:53
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Yup, makes sense. VERY tight code and memory requirements. I prefer risc for that,
but mine are only baby hardware, micro-controllers... Thanks Firoball. Sorry if I offended.

Sorry all for drifting off-topic...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: 0 == NULL ??? [Re: EvilSOB] #278401
07/13/09 14:21
07/13/09 14:21
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
offended?? Not at all.

Page 2 of 3 1 2 3

Moderated by  old_bill, Tobias 

Gamestudio download | 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