Gamestudio Links
Zorro Links
Newest Posts
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 01/07/26 15:14
Zorro locks DLL
by jcl. 01/07/26 13:33
zorro with ccxt?
by qin. 01/07/26 07:50
The new evaluation system
by jcl. 01/05/26 08:50
bar time, right side open or close?
by Spirit. 01/03/26 08:10
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (AndrewAMD, Grant, Quad, 1 invisible), 3,833 guests, and 13 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Syndrela, HDRSEO, AOUNZA, digitalboy381, agasior
19190 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Void #265989
05/15/09 12:50
05/15/09 12:50
Joined: Oct 2007
Posts: 116
S
sydan Offline OP
Member
sydan  Offline OP
Member
S

Joined: Oct 2007
Posts: 116
The term 'void'. I'm guessing this is a lite-c function.
What is it for? Its not in the manual. How is it used?


For some reason, my ambition always seems to beat my ability.
Re: Void [Re: sydan] #265991
05/15/09 12:54
05/15/09 12:54
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
"void" is the same as the "function". But by the void you don`t can return a parameter. I think void is a little bit faster then function (?)

Re: Void [Re: Widi] #265992
05/15/09 13:04
05/15/09 13:04
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
void ist a data type that holds no data.
If it is used as a return type for a function, it implies that the function doesn't return any value.

A void pointer however is something different. It can point to any type of data.

Re: Void [Re: Saturnus] #265994
05/15/09 13:12
05/15/09 13:12
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
void is not a lite-c thing, it's a c/c++ type that is "nothing".

when you are defining functions you use a keyword before functions name to state what it returns.

like by using int in this function definition

int square(int a){
return a*a;
}

you say that , this fucnition will return a int. if your function doesn't return anyting, then you use void. and from what i can remember "function" and "action" are typedefd to void.

However in lite-c as Kombucha said, there is that void pointer thing that can point to any type of data(because all pointers are in same size, in void pointer you dont specify what type of object/type it points to, it can point any type of type/struct.)


3333333333
Re: Void [Re: Quad] #265997
05/15/09 13:35
05/15/09 13:35
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
action is a void type, but function a VAR type
Otherwise I Quadraxas is right, to the best of my knowledge.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Void [Re: EvilSOB] #266043
05/15/09 16:57
05/15/09 16:57
Joined: Oct 2007
Posts: 116
S
sydan Offline OP
Member
sydan  Offline OP
Member
S

Joined: Oct 2007
Posts: 116
Hey thanks guys.


For some reason, my ambition always seems to beat my ability.

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

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