> Hi, > > Can you quote the thing you've written? Maybe you missed something or > so... Normally it should work with both len() or string.len() > > Ok, then you said you will only give strings to another program, so the > font shouldn't be important. In Basic, the only way of doing what you > want will be using Print with a comma: > > print "22.55", 'the comma adds a tab character chr$(9) > > Then I remember (was it PowerBasic?) a "USING" thing where one could do > such things with a mask of "###" or so. Long time ago, very, very long > time ;-) Never used that stuff then. > > But as you need right-aligned tabs... you will need to spend a little > time developing an algorithm that assembles your lines. > > You mentioned other languages that offer easier ways. Can you give me an > example? The easiest way I can think of would be some function where you > define the line length and the tabs and then you add the strings to be > inserted. If this function just replaces a line of spaces with the > inserted strings, it wouldn't be too complicated. > > Rolf >
In Gambas 3, you can do that: sBuffer = Space$(80) Mid$(sBuffer, 1) = FirstColumn Mid$(sBuffer, 15) = SecondColumn Mid$(sBuffer, 28) = ThirdColumn ... Print sBuffer Regards, -- Benoît ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user