home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.pascal.borland      Borland Pascal was actually pretty neat      2,978 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,120 of 2,978   
   Robert AH Prins to All   
   Re: printing variable problems   
   11 Apr 06 23:14:45   
   
   From: prino@onetel.com   
      
    wrote in message   
   news:1144789243.835930.249590@i39g2000cwa.googlegroups.com...   
   > Hey all.   
   >   
   > I'm doing an ordering / booking system which is capable of printing   
   > invoices. The only thing which really annoys me at the moment is that   
   > if I want two variables printed (from printer to paper, not to screen)   
   > on the same line, then the length of the first variable affects the   
   > layout of the second variable. I'll give an example as I'm not so good   
   > at explaining.   
   >   
   > I want a part of my invoice to look like this when printed on paper:   
   >   
   > Description: 4" Exhaust Tail Pipe     Description: 5" Exhaust Tail   
   > Pipe   
   >   
   > Description: 18" Wheel Trim           Description: 20" Wheel Trim   
   >   
   > It will not look like that, instead it will look like this:   
   >   
   > Description: 4" Exhaust Tail Pipe     Description: 5" Exhaust Tail   
   > Pipe   
   >   
   > Description: 18" Wheel Trim      Description: 20" Wheel Trim   
   >   
   > The length of my 'stock name' variable affects the layout of things   
   > horizontal from it when printed. In the above '18" Wheel Trim' is   
   > shorter than '4" Exhaust Tail Pipe' and so the text and variable are   
   > brought further left automatically. This can start to get messy when   
   > lots of items are printed. GotoXY only works for printing variables to   
   > screen, and I've tried printing spaces but that would only help for   
   > the   
   > current stock item, there are loads of stock items so this doesn't   
   > work. Any help would be greatly appreciated.   
      
   Create a string[n] variabe and assing the concatenation of your   
   'Description:' + the actual description + a load of spaces to it.   
   Pascal's strictly enforced type-checking will discard the spaces that   
   exceed the declared length of the string.   
      
   HTH,   
      
   Robert   
   --   
   Robert AH Prins   
   prino at prino dot plus dot com   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca