[Gambas-user] How to control the PRINT output in console application

Sergio A. Hernandez info.geex at ...626...
Sun May 17 00:41:24 CEST 2009


You can try something like this
PRINT Format$(TimeVal, "-0.00"), Format$(height, "-0,000.00"),
Format$(velocity, "-0.00")

by doing this you force to insert 0 to make the numbers of the same
size, but I think is kind of awkward to see 0220.00 instead of 220.00

If you want to have a nice aligned text like this
0.0        220        1.14
0.5      2176.49    1.04

You can build your own Format$ function by using Len, Space$, Mid$.

On Sat, May 16, 2009 at 12:44 PM, KhurramM <kmsuse at ...626...> wrote:
>
> Hello! I am writing this code:
>
> PRINT Format$(TimeVal, "-.##"), Format$(height, "-.##"), Format$(velocity,
> "-.##")
>
> But getting:
>  0       220    1.14
>  .5      2176.49    1.04
>
> Now here, how I control the allignment of 1.14 to be vertically same with
> 1.04.
>
> The first two entries are correct.
>
> Thankyou:working:
> --
> View this message in context: http://www.nabble.com/How-to-control-the-PRINT-output-in-console-application-tp23576681p23576681.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables
> unlimited royalty-free distribution of the report engine
> for externally facing server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list