Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TipmyPip, ozgur), 1,240 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 4 1 2 3 4
Re: the comparisons of if clauses are still executed completely [Re: Uhrwerk] #360437
02/23/11 22:30
02/23/11 22:30
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Quote:
functions with a variable argument number

Works fine for me (or am I missing sth?) :
Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////


var add(var x, var y, var z) {
	return (x+y+z);
}

var add(var x, var y) {
	return (x+y);
}

void main() {
	video_screen = 0;
	printf("\n%d",(int)add(1,2));
	printf("\n%d",(int)add(1,2,3));
}




"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: the comparisons of if clauses are still executed completely [Re: Superku] #360438
02/23/11 22:34
02/23/11 22:34
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
The problem is that variadic functions don't work. Your example is just overloarding, but what Uhrwerk means is something like this:

Code:
void foo(char *format, ...)
{
   va_list args;
   va_start(args, format);

   // Do something with the format string

   va_end(args);
}



Btw, declaring functions which take variable arguments is already supported, but va_list, va_start, va_arg, va_end and va_copy is missing.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Page 4 of 4 1 2 3 4

Moderated by  aztec, Spirit 

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