TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: PETER.WALLER
from: RONALD SCHLEGEL
date: 1998-01-25 20:16:00
subject: Sub`s Or defining Procedu

PP> Erm, I Have been Trying To Define a procedure that will detect a
PP> letter and change it To the opposite letter.
PP> a$=LEFT(b$,1) 
PP> run proc changeletter a$
PP> PROC changeletter 
PP> if b$ = "a" then 
PP> c$ = c$+"z" if b$ = "b" 
PP> then c$ =
PP> c$+"y" etc. etc. END proc
 
Here's a few ideas:
-------------------CUT----------------
CLS
 
b$= "ramble on"
PRINT b$
 
CALL ChangeLetter(b$)
PRINT b$
 
SUB ChangeLetter(b$)
 a1$ = LEFT$(b$, 1)
 
SELECT CASE a1$
 CASE "a"
  REPLACE LEFT$(b$, 1) WITH "z" IN b$
 CASE "b"
  MID$(b$, 1, 1) = "y"
 CASE "c"
  LEFT$(b$, 1) = "x"
END SELECT
 
END SUB
 
END
 
-------------------CUT---------------------
-Ron
 
***
 þ RM 1.3 03129 þ RoboMail -- The next generation QWK compatible reader!
--- TriToss (tm) Professional 11.0 - #229
---------------
* Origin: * Dynasty BBS * The Home of Crazy Nights Software * (1:110/1065.0)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.