www.digitalmars.com         C & C++   DMDScript  

D - passing static arrays as arguments

reply "Carlos Santander B." <carlos8294 msn.com> writes:
The following doesn't work:

void foo(ubyte[] a) { ... }
...
foo( [3,4] );

-------------------------
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 2003-07-04
Jul 08 2003
parent "Walter" <walter digitalmars.com> writes:
"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:beg1m9$1bul$1 digitaldaemon.com...
 The following doesn't work:

 void foo(ubyte[] a) { ... }
 ...
 foo( [3,4] );
That's because array literals are not part of the language (yet).
Jul 09 2003