Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (TedMar, AndrewAMD, dr_panther, 1 invisible), 1,186 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İ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 | 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