[comp.sys.ibm.pc] editing IBM BASIC programs

anthony@utstat.UUCP (11/30/87)

	Can someone advise me how I can edit an IBM BASIC program using a
word processor (such as WordPerfect)? As you know, when using the SAVE command,
the disk file is NOT ASCII.

	Also, how does one issue a DOS command through BASIC? For example, if
I want to issue the "timer/s" command during the execution of my program, how
do I accomplish this?

	Thanks in advance.

-- 

       	{allegra,ihnp4,linus,decvax}!utzoo!utstat!anthony
        {ihnp4|decvax|utzoo|utcsrgv}!utgpu!utzoo!utstat!anthony

creps@silver.bacs.indiana.edu (Steve Creps) (12/01/87)

In article <1987Nov30.001912.20101@utstat.uucp> anthony@utstat.uucp (Anthony Ayiomamitis) writes:
>	Can someone advise me how I can edit an IBM BASIC program using a
>word processor (such as WordPerfect)? As you know, when using the SAVE command
>the disk file is NOT ASCII.
   try SAVE "FILE",A

>	Also, how does one issue a DOS command through BASIC? For example, if
>I want to issue the "timer/s" command during the execution of my program, how
>do I accomplish this?
   SHELL "timer/s"

-	-	-	-	-	-	-	-	-
Steve Creps on the VAX 8650 running Ultrix 2.0-1 at Indiana University.
	creps@silver.bacs.indiana.edu
"F-14 Tomcat! There IS no substitute."

russ@hpldola.HP.COM (Russell Johnston) (12/01/87)

>	Can someone advise me how I can edit an IBM BASIC program using a
>word processor (such as WordPerfect)? As you know, when using the SAVE command,
>the disk file is NOT ASCII.

Save the program in ascii format:  SAVE"program",A
Make sure the word proceesor uses straight ascii files
(i.e. WordStar you must use nondocument mode)

>	Also, how does one issue a DOS command through BASIC? For example, if
>I want to issue the "timer/s" command during the execution of my program, how
>do I accomplish this?

Try the shell command:  SHELL "dos command"

davidsen@steinmetz.steinmetz.UUCP (William E. Davidsen Jr) (12/01/87)

In article <1987Nov30.001912.20101@utstat.uucp> anthony@utstat.uucp (Anthony Ayiomamitis) writes:
| 
| 	Can someone advise me how I can edit an IBM BASIC program using a
| word processor (such as WordPerfect)? As you know, when using the SAVE command,
| the disk file is NOT ASCII.

save file,a
 
| 	Also, how does one issue a DOS command through BASIC? For example, if
| I want to issue the "timer/s" command during the execution of my program, how
| do I accomplish this?

shell("dir")
       ^^^ string constant or variable

-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me

lester@ka3adu.UUCP (lester) (12/02/87)

In article <1987Nov30.001912.20101@utstat.uucp>, anthony@utstat.uucp (Anthony Ayiomamitis) writes:
> 
> 	Can someone advise me how I can edit an IBM BASIC program using a
> word processor (such as WordPerfect)? As you know, when using the SAVE command,
> the disk file is NOT ASCII.
> 
> 	Also, how does one issue a DOS command through BASIC? For example, if
> I want to issue the "timer/s" command during the execution of my program, how
> do I accomplish this?

1. Before editing the file with a text wordproc, save the file like thus 
     save "file.bas",a
  (Note the ',a' this tells it to save in ascii)
  This will save the file as an ascii text file.
2. To issue a DOS command the syntax is;
   shell "command"
   you can include paths in the shell i.e. 
  100 shell "\utils\map"

	Hope this helps

brown@nicmad.UUCP (Mr. Video) (12/08/87)

In article <1987Nov30.001912.20101@utstat.uucp> anthony@utstat.uucp (Anthony Ayiomamitis) writes:
<
<	Can someone advise me how I can edit an IBM BASIC program using a
<word processor (such as WordPerfect)? As you know, when using the SAVE command,
<the disk file is NOT ASCII.

The first thing you need to do is save the program with the ',A' option, ie:

	save "programname.BAS",a

This will save the program as an ASCII file.  Instead of using a word
processor, I would suggest using QuickBASIC.  It has a built-in editor
and will run your programs on the spot.  And it is cheap.

<	Also, how does one issue a DOS command through BASIC? For example, if
<I want to issue the "timer/s" command during the execution of my program, how
<do I accomplish this?

Do a SHELL "dos_command"
-- 
	       harvard-\	       ihnp4--\
Mr. Video               !uwvax.................!nicmad!brown
	       rutgers-/  terminus-/  decvax--/
"... a can of deoderant that measures nine on the richter scale?"