If you RUN the program you'll get a 2 Variable not found, 20:1 error, denoting that at line 20, NextBASIC has no idea what a means. Now without erasing the program give the following series of commands:
LOAD "data" DATA a():FOR d=1 TO 30: PRINT
a(d): NEXT d
You'll get the same series of numbers you stored with the previous program (before you typed NEW) on screen. If you however attempt to RUN the program you just typed the 2 Variable not found, 20:1 error will persist. In order to fix this, you will need to add the following line:
1 LOAD "data" DATA a()
which will produce the same effect as the direct command you gave earlier. You do not need to DIMension the array as LOAD will do that for you. It is also useful to note that it doesn't matter which array's data you saved since, when you load the same data back, you can assign it to any available array. So you could theoretically SAVE "data" DATA a() and LOAD "data" DATA b(). The only thing you need to remember is that the array type must match the data saved otherwise you will receive a b Wrong file type, 0:1 error.
Using the INT modifier with SAVE will store a snapshot of all your integer variables and arrays. All 24 integer variables and 24 integer arrays are saved regardless of if they contain data or not.
Finally the INPUT modifier used with SAVE stores your current keyboard joystick key assignments
When storing data on tape, in order to make sure what the program or raw data that you've stored is accurate, NextZXOS provides NextBASIC with the VERIFY command. On media other than a tape, VERIFY has no effect unless it's used in conjunction with a drive name in which case it will act like its LOAD and SAVE counterparts switching the default drive to the one specified. In every case, if not used on tape (drive t:), VERIFY will return 0 OK 0:1. VERIFY follows the same syntax as SAVE except for the LINE modifier. Assuming you have a tape deck attached to your ZX Spectrum Next, and having the Hello World! program we typed a little earlier, save the program into tape by giving:
SAVE "t:": SAVE "hello.bas"
Now we will try to make sure that the program was saved to tape properly by doing the following:
VERIFY "hello.bas"
If the program name has not been displayed, then either the program was not saved properly in the first place, or it was but was not read back properly. You need to find out which of the two is true. To see if it was saved properly, rewind the tape to just before the point at which you saved the program, then play it back while listening to your audio output.
ZX Spectrum Next User Manual, 3rd Edition (ISBN 978-1-5272-5496-1), written and illustrated by Phoebus R. Dokos. Copyright © 2020-2024 Phoebus Dokos / SpecNext Ltd. Licensed under CC BY-NC-SA 4.0. This is a transcription and can contain errors; check any doubt against the printed page.