On Thu, 2007-03-22 at 02:49 +0200, Klas Ivarsson wrote:
> Hi!
> 
> Should this compile?
> 
> //---------------------------
> #import <flx.flxh>
> 
> var a = mkuiv[int](size 10);
> a+=1;
> a+=2;
> print "len a = "; print$ len a; endl;
> print "maxlen a = "; print$ maxlen a; endl; 
> print$ a.[0]; print ","; print a.[1]; endl;
> //---------------------------
> 
> The compiler complains that mkuiv can't be found.
> Hmm...it's probably some silly thing I've missed.

It's a silly thing I originally missed: the argument type
has been changed to ulong:

   // default initialised but set to 0 length
   gen mkuiv[t] (n:ulong): varray[t] = {
     var p: varray[t] = mkiv[t](n);
     set_used(p,ulong 0);
     return p;
   }

because the underlying allocator uses ulong.

Unfortunately size = size_t is nasty, because we don't
know what type it aliases, nor how big it is: ulong is a
definite type.

This may change again ;(


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to