FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Print problems

 
Post new topic   Reply to topic     Forum Index -> Mango
View previous topic :: View next topic  
Author Message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Sat May 06, 2006 6:37 pm    Post subject: Print problems Reply with quote

This program:

Code:

import mango.io.Stdout;

void main()
{
   ubyte a = 1;
   Stdout.print("?d", a) (CR);

   byte b = 2;
   Stdout.print("?d", b) (CR);

   ushort c = 3;
   Stdout.print("?d", c) (CR);

   short d = 4;
   Stdout.print("?d", d) (CR);

   uint e = 5;
   Stdout.print("?d", e) (CR);

   int f = 6;
   Stdout.print("?d", f) (CR);

   ulong g = 7;
   Stdout.print("?d", g) (CR);

   long h = 8;
   Stdout.print("?d", h) (CR);

   float i = 9;
   Stdout.print("?f", i) (CR);

   double j = 10;
   Stdout.print("?f", j) (CR);

   ireal k = 11i;
   Stdout.print("?d", k) (CR);

   creal l = 12 + 13i;
   Stdout.print("?d", l) (CR);

   Stdout.print("?s", k) (CR);
   Stdout.print("?s", l) (CR);
}


Outputs:

Code:

0
0
0
0
5
6
7
8
09.000000
10.000000
0
0
false
false


The last two (k and l), I'm not even sure how they should be formatted, but with ?s why are they shown as false?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kris



Joined: 27 Mar 2004
Posts: 1494
Location: South Pacific

PostPosted: Tue May 09, 2006 8:52 pm    Post subject: Reply with quote

there was a bug in the packaged release of 2.0 -- later fixed in the trunk. However, ireal and creal will not print directly (there's no writer signature for that type at this time), and the 9.0 value has that odd 0 prefix. I'll fix that right now Smile

Thanks;
Back to top
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Tue May 09, 2006 9:05 pm    Post subject: Reply with quote

Ok, thanks.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Mango All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group