From: "Barry Erick"
Subject: Re: Sub's Or defining Procedures
Nope,
Just taking his code with the least changes. That is how to show someone
and then let them come up with making it neater. We don't write their
programs, simply help them out.
-Barry
Jose Mejuto wrote in message ...
"Barry Erick" wrote:
BE> Peter,
BE> You need to do this:
BE> a$=LEFT(b$,1)
BE> changeletter a$
BE> SUB changeletter(b$)
BE> if b$ = "a" then c$ = c$+"z"
[...]
Are you really trying to help Peter or you want to confuse him ? It's
really more easy than your code:
A$=Left$(B$,1)
ChangeLetter (B$)
Sub ChangeLetter(B$)
Select Case B$
Case "a":B$="z"
Case "b":B$="y"
....
End Select
End Sub
Of Course this is not the best way... look at this:
A$=Left$(B$,1)
ChangeLetter (B$)
Sub ChangeLetter(B$)
Target$="zyxwvutsrqponmlkjihgfedcba"
B$=Mid$(Target$,ASCII(B$)-96,1)
End Sub
--
Jose Mejuto
- - - - - http://www.pobox.com/~jmejuto
- - - - - FidoNet 2:348/102.0
*** QwkNews (tm) v2.1
* [TN11.1] Internet Newsgroup: alt.lang.powerbasic
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/561)
|