Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 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