TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: TIM HUTZLER
from: LAWRENCE GORDON
date: 1997-02-10 11:47:00
subject: CHDRIVE command not work

On 02-09-97, Tim Hutzler wrote to All:
 TH> Has anyone encountered a program hang when CHDRIVE is used?
 TH> I used it in the following way:
 TH> File = "B:\*.*"
 TH> CHDRIVE File
That won't work, Tim. CHDRIVE takes a one character argument: the drive 
letter.
DIM FILENAME AS STRING
FILENAME = "B:\*.*"
NEWDRIVE$ = LEFT$(FILENAME,1)
CHDRIVE NEWDRIVE$
 TH> Now, CHDRIVE is not listed in the Reference guide under "Command
 TH> Summary" in the front of the book, but it is in the reference
 TH> directory. It states that the first character of a string is used
 TH> as the drive letter, implying that it will take a string the same
 TH> way ASC("ABC") does. However, I noticed that programs if I try to
 TH> use it, even though it IS NOT actually executed. That seems to
 TH> indicate that the compiler is not calculating the correct jump
 TH> addresses.
It's been my experience that you need to move the first letter of the sting 
into a variable before calling CHDRIVE.
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/560.1)

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™.