Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

help

2 views
Skip to first unread message

Bart van den Burg

unread,
Sep 13, 2000, 3:00:00 AM9/13/00
to
hi

i need some help on a program I'm making
I've got three variables, for example:
ipa% = 0
ipb% = 1
ipc% = 5

these 3 are defined by the user of the program
this had to become:
ipaa$ = 15

I wondered if you could help me, thanks
Bart

B. Muck

unread,
Sep 15, 2000, 3:00:00 AM9/15/00
to
You need to explain your problem with a little more depth. I'm not even sure
what you're asking.

If you're looking to manipulate variables, you can always check out the SWAP
statement for swapping variable contents, or STR$ for converting an integer
variable into a string. Conversely, you can use VAL to convert a string value
into an integer. Examples:

A = 5, B = 6
SWAP(A, B)
now, A = 6 and B = 5

A = 5, STR$(A) = "5"
A$ = "5", VAL(A$) = 5

cheers,
Brendon
Be distinct, or be extinct.
http://members.aol.com/brainsawx

Nicolaas Vroom

unread,
Sep 16, 2000, 3:00:00 AM9/16/00
to

> Bart van den Burg <ba...@bart99.tmfweb.nl
> wrote in news 8pobhg$pdr$1...@cyan.nl.gxn.net...

I think the program you are looking for is:

CLS


ipa% = 0
ipb% = 1
ipc% = 5

ipa$ = STR$(ipa%)
ipb$ = STR$(ipb%)
ipc$ = STR$(ipc%)
PRINT ipa%, ipb%, ipc%
PRINT ipa$, ipb$, ipc$
ipaa$ = LTRIM$(ipa$) + LTRIM$(ipb$) + LTRIM$(ipc$)
ipaa% = VAL(ipaa$)
PRINT ipaa$, ipaa%

The print out is:

0 1 5
0 1 5
015 15

http://gallery.uunet.be/nicvroom/

Martin Grosen

unread,
Sep 16, 2000, 3:00:00 AM9/16/00
to
...or how about a nice simple solution like:


CLS
ipa% = 0
ipb% = 1
ipc% = 5

ipaa$ = STR$(ipa% * 100 + ipb% * 10 + ipc%)
PRINT ipaa$

Note this example looses the zero at the start as requested.


0 new messages