Hi Everyone,
I am looking at my quick reference guide and the basic-plus manual, I can't seem to find a way to append new information to a file.
Do I have to open the original file and read each line and print them to a new file, then print the info I want to add?
there is no:
1000 open "file.txt" for append as file #3
1010 print #3, n1$
1020 close #3
BTW how can I find out if I have basic-plus or basic-plus-2?
On 2023-08-29 06:47, Ronald Hudson wrote:
Hi Everyone,
I am looking at my quick reference guide and the basic-plus manual, I can't seem to find a way to append new information to a file.I think you need to use the MODE keyword with an appropriate value.
Do I have to open the original file and read each line and print them to a new file, then print the info I want to add?
there is no:The BASIC+ manual just mentions the MODE keyword, but refers to the
1000 open "file.txt" for append as file #3
1010 print #3, n1$
1020 close #3
RSTS/E programming manual for more details. So you need to go and dig in there. Bit 1, I think. But test around some, and read the docs...
For BASIC+2, you say:
OPEN "file.txt" ACCESS APPEND AS FILE 3
BTW how can I find out if I have basic-plus or basic-plus-2?If you are switching, then it is into BASIC+.
BASIC+2 you need to run. And it's also easy to tell when it starts:
.bp2
PDP-11 BASIC-PLUS-2 V2.7-C
BASIC2
Johnnyoooh and it has an extensive help system..
On Tuesday, August 29, 2023 at 6:50:21 AM UTC-7, Johnny Billquist wrote:I can't seem to find a way to append new information to a file.
On 2023-08-29 06:47, Ronald Hudson wrote:
Hi Everyone,
I am looking at my quick reference guide and the basic-plus manual,
them to a new file, then print the info I want to add?I think you need to use the MODE keyword with an appropriate value.
Do I have to open the original file and read each line and print
Basic-Plus-2 manual .pdf file.The BASIC+ manual just mentions the MODE keyword, but refers to the
there is no:
1000 open "file.txt" for append as file #3
1010 print #3, n1$
1020 close #3
RSTS/E programming manual for more details. So you need to go and dig in
there. Bit 1, I think. But test around some, and read the docs...
For BASIC+2, you say:
OPEN "file.txt" ACCESS APPEND AS FILE 3
BTW how can I find out if I have basic-plus or basic-plus-2?If you are switching, then it is into BASIC+.
BP2 complains about that syntax. I will see if I can hunt up a
BP2 also hated my compound statements: "1000 n=0:l=0:m=5:q=7 ": for separating statements was already deprecated in BASIC+, but still possible. Not allowed anymore in BASIC+2. DEC changed into using
But at least I have Basic+2 which is nice.Ok. That's good.
It does. Oh, and if you want a bit of inspiration:oooh and it has an extensive help system..
BASIC+2 you need to run. And it's also easy to tell when it starts:
.bp2
PDP-11 BASIC-PLUS-2 V2.7-C
BASIC2
Johnny
Hi Johnny and everyone,
I am looking in on-line help and in the "Basic Plus 2 RSTS/E User's guide" but I don't see how one might do this:
from a DCL prompt launch BP2 with a basic program in a .B2S file and run the Basic program.
I can launch BP2 then I have to manually OLD <MYFILE> The .B2S extension seems to be optional, then RUN.
On 2023-08-29 21:48, Ronald Hudson wrote:I was playing with that earlier - the build step looks like TKB, but I could not get the correct incantation to turn my .OBJ into a .TSK -- This is what I want to end up with, right?
Hi Johnny and everyone,
I am looking in on-line help and in the "Basic Plus 2 RSTS/E User's guide" but I don't see how one might do this:
from a DCL prompt launch BP2 with a basic program in a .B2S file and run the Basic program.
I can launch BP2 then I have to manually OLD <MYFILE> The .B2S extension seems to be optional, then RUN.BASIC+2 is primarily a compiler. You compile your program, and get a
.OBJ file, which you then link, and then you have an executable.
See the help for COMPILE and BUILD in BASIC+2.
With that said, if you want to run something interactively, I would
think *maybe* this would do it:
$ BP2
OLD FOO
RUN
But that is a guess from my side. I'm no expert in RSTS/E... I can tell
you how to do it in RSX, but that won't help you. ;-)
Johnny
On Tuesday, August 29, 2023 at 5:24:21 PM UTC-7, Johnny Billquist wrote:
On 2023-08-29 21:48, Ronald Hudson wrote:I was playing with that earlier - the build step looks like TKB, but I could not get the correct incantation to turn my .OBJ into a .TSK -- This is what I want to end up with, right?
Hi Johnny and everyone,BASIC+2 is primarily a compiler. You compile your program, and get a
I am looking in on-line help and in the "Basic Plus 2 RSTS/E User's guide" but I don't see how one might do this:
from a DCL prompt launch BP2 with a basic program in a .B2S file and run the Basic program.
I can launch BP2 then I have to manually OLD <MYFILE> The .B2S extension seems to be optional, then RUN.
.OBJ file, which you then link, and then you have an executable.
See the help for COMPILE and BUILD in BASIC+2.
With that said, if you want to run something interactively, I would
think *maybe* this would do it:
$ BP2
OLD FOO
RUN
But that is a guess from my side. I'm no expert in RSTS/E... I can tell
you how to do it in RSX, but that won't help you. ;-)
Johnny
I will try the compile and build commands from within Basic+2.
On 2023-08-30 05:35, Ronald Hudson wrote:
On Tuesday, August 29, 2023 at 5:24:21 PM UTC-7, Johnny Billquist wrote:
On 2023-08-29 21:48, Ronald Hudson wrote:I was playing with that earlier - the build step looks like TKB, but I could not get the correct incantation to turn my .OBJ into a .TSK -- This is what I want to end up with, right?
Hi Johnny and everyone,BASIC+2 is primarily a compiler. You compile your program, and get a
I am looking in on-line help and in the "Basic Plus 2 RSTS/E User's guide" but I don't see how one might do this:
from a DCL prompt launch BP2 with a basic program in a .B2S file and run the Basic program.
I can launch BP2 then I have to manually OLD <MYFILE> The .B2S extension seems to be optional, then RUN.
.OBJ file, which you then link, and then you have an executable.
See the help for COMPILE and BUILD in BASIC+2.
With that said, if you want to run something interactively, I would
think *maybe* this would do it:
$ BP2
OLD FOO
RUN
But that is a guess from my side. I'm no expert in RSTS/E... I can tell >> you how to do it in RSX, but that won't help you. ;-)
Johnny
I will try the compile and build commands from within Basic+2.The BUILD command will create the command file needed for TKB to link
the file.
Once you've createed that command file for TKB, you use that.
In RSX, the command would be
TKB @file
(in MCR)
or
LINK file/BASIC
(in DCL)
Not sure how it might be invoked in RSTS/E...
The exact settings used for generating that input can be seen if you do "SHOW" in BP2.
Johnny
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 339 |
Nodes: | 16 (2 / 14) |
Uptime: | 24:53:16 |
Calls: | 7,490 |
Calls today: | 4 |
Files: | 12,707 |
Messages: | 5,637,703 |