Discussion:
ULP: Passing arrays to functions?
(too old to reply)
A. Zaffran
2011-02-14 14:47:25 UTC
Permalink
Hello.
Is it possible to pass array arguments to functions? For example, what's
int f(int x[]) {
...
}
No, only single integer, real, string and character can use as argument.

int f(int x) {
...
return x;
}


for (int n = 0; n < x; n++) {
int z = f(x[n]);
...
}


Mit freundlichen Grüßen / Best regards

Alfred Zaffran
--
_____________________________________________________________
Alfred Zaffran Support
CadSoft Computer GmbH Hotline: 08635-698930
Pleidolfweg 15 FAX: 08635-698940
84568 Pleiskirchen eMail: <***@cadsoft.de>
Web: <www.cadsoft.de>
Registergericht: Amtsgericht Traunstein HRB 5573
Geschäftsführer: Dipl.-Ing. Klaus Schmidinger, Bodo Badnowitz
_____________________________________________________________
Asher Hoskins
2011-02-14 15:01:07 UTC
Permalink
Post by A. Zaffran
Hello.
Is it possible to pass array arguments to functions? For example, what's
int f(int x[]) {
...
}
No, only single integer, real, string and character can use as argument.
Oh well, my code will still work, it'll just be less neat. Thanks for
the quick reply!


Asher.

Loading...