Re: diRu10,d0

From: Christian Johansson (c64_at_comhem.se)
Date: 2004-09-08 21:36:44

----- Original Message ----- 
From: "Baltissen, GJPAA (Ruud)" <ruud.baltissen@abp.nl>
To: <cbm-hackers@cling.gu.se>
Sent: Monday, September 06, 2004 4:10 PM
Subject: diRu10,d0


> Hallo allemaal,
>
>
> I'm using a BASIC program to test all kind of functions of CBM-HD. At the
> moment I'm testing the ability to handle subdirectories. For this reason I
> want to use the DIRECTORY command as this command doesn't cause the CBM to
> overwrite the PRG as a LOAD"$",10 would do. To be able to use the program
> for more then one device, I set a variable in line 1: U=10. If I need to
> test things for device 11, I only have to change line 1. The problem
however
> is that I have no idea how to use this variable in combination with the
> DIRECTORY command. 'directoryu10,d0' does work, 'directoryu u,d10' does
not.
>
> Any help please? Thanks!

You can do like this. This only works when U is a one-digit number, i.e. 8
or 9 but I'm sure that you can extend it a little. The main thing to see
here is that string variable names in disk commands must be enclosed within
().

10 U=9
20 U$="U"+CHR$(U+ASC("0"))
30 DIRECTORY (U$),D0

/Christian


       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.