void command?

Just starting out? Need help? Post your questions and find answers here.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

void command?

Post by blueznl »

i might have overlooked it, but is there something like a 'void' command in pb?

void.l = closesocket_(socket_nr)

means the result is assigned to a variable

but if i don't care about the result, i can just as well 'throw away' that result, thus leading to just microscopic faster code :-)

in another basic (which i will not mention here :-)) one could do:

void closecoket_(socketnr)

is there such a thing in pb?
WolfgangS
Enthusiast
Enthusiast
Posts: 174
Joined: Fri Apr 25, 2003 3:30 pm

Re: void command?

Post by WolfgangS »

blueznl wrote:void closecoket_(socketnr)

is there such a thing in pb?
No there isn't.

I see no enhancement if you write

void closecoket_(socketnr) instead of

closecoket_(socketnr)


MFG
WolfgangS
WolfgangS' projects http://www.schliess.net
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

there isn't, i just didn't realize i could write it wihout an assignment, call me stupid or what :oops:

(and the examples in the help file all had the notation a = b() which threw me off-track)
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Re: void command?

Post by GPI »

blueznl wrote:i might have overlooked it, but is there something like a 'void' command in pb?

void.l = closesocket_(socket_nr)
Simple Write:

CloseSocket_(Socket_Nr)
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

yeah, i know now :oops:
Doobrey
Enthusiast
Enthusiast
Posts: 218
Joined: Sat Apr 26, 2003 4:47 am
Location: Dullsville..population: me
Contact:

Post by Doobrey »

blueznl wrote: call me stupid or what :oops:
OK stupid :wink:

Don`t worry, we all make silly mistakes now and then (installing Windows for example!)
Post Reply