🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.tools
Article #889

Re: Visual Basic Win 2.0

#889
From: Don Hackler
Date: Sat, 09 Jan 1993 22:49
43 lines
2124 bytes
af734@yfn.ysu.edu (Andy Klein) writes:

> 
>      I'm using Visual BASIC Standard Edition v2.0 and I've run into
> the following dilemma.  I'm trying to create an array of string by
> concatenating two other values together, but would like the two
> columns of data to each be left justified.  However, the font that
> I am using contains letters of different widths.  For instance,
> assume an array of strings called Names$() and an array of integers
> called Num%() contain the following made-up data:
>  
>      Names$(1) = "Samuel"          Num%(1) = 15
>      Names$(2) = "Richard"         Num%(2) = 3
>      Names$(3) = "Al"              Num%(3) = 221
>      Names$(4) = "James"           Num%(4) = 54
>      Names$(5) = "Bob"             Num%(5) = 11
>  
> I would then like to create a second string array called Results$()
> that contained the following:
>  
>      Results$(1) = "Samuel   15"
>      Results$(2) = "Richard  3"
>      Results$(3) = "Al       221"
>      Results$(4) = "James    54"
>      Results$(5) = "Bob      11"
>  
> My problem is that since the characters in MS-Windows aren't all
> the same pixel width, the column of numbers is not vertically lined
> up correctly when I print the results.  Is there a way to get the
> second column of numbers to be lined up?  Thanks,
> Andy Klein

Print them separately so that the second column can be positioned
independently of the first.
- or -
Use a fixed-width font (such as one of the Courier variations)
so that the columns line up automatically.

- don

------------------------------------------------------------------
Don Hackler  - donh@shakala.com 
Shakala BBS (ClanZen Radio Network) Sunnyvale, CA 408-734-2289
Technical Details
Message-ID: <X0s5wB4w165w@shakala.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!pagesat!a2i!shakala!donh
References: <1993Jan8.223222.16819@news.ysu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!pagesat!a2i!shakala!donh
From: donh@shakala.com (Don Hackler)
Newsgroups: comp.os.ms-windows.programmer.tools
Subject: Re: Visual Basic Win 2.0
Message-ID: <X0s5wB4w165w@shakala.com>
Date: 9 Jan 93 22:49:56 GMT
References: <1993Jan8.223222.16819@news.ysu.edu>
Organization: Shakala BBS (ClanZen Radio Network) Sunnyvale, CA 408-734-2289
Lines: 43