> Fellow QL'ers
> I have a slight problem with TYPE_IN
> Using it to put some commands in #0, works well in an instance until I
> reach what appears to be a maximum set of characters, where the QL just
> 1920 TYPE_IN An&":"&CHR$(10)
> 1930 TYPE_IN (An+1)&Top$&CHR$(10)
> 1932 TYPE_IN (An+2)&Final$&CHR$(10)
> 1940 TYPE_IN (An+3)&Top$&CHR$(10)
> An is an integer
> Final$ is just text
> Top$ is a string of asterisks
> it locks up displaying halfway through 1940
> Is there a buffer I can clear after using TYPE_IN?
> or can I increase the length of the number of characters TYPE_IN can use?
> Many thanks in anticipation
If this is a compiled Turbo program, then there should be no problems as each
of the typed-in commands would be processed separately.
Running this under the Interpreter is slightly different. Each of the typed-in
commands will only get to be processed once the SuperBASIC program has come
to a stop. Before this stop happens, everything typed in to SuperBASIC's #0
will be stored in #0's buffer. If there are many commands to be processed, then
this buffer could be exceeded, resulting in one of the commands being truncated
and the remainder being lost. There is a simple way to overcome this problem.
The program can be deliberately stopped after each of the TYPE_INs, and then be
made to continue afterwards. To get the program to stop, use the STOP command,
and to get the program to continue, use the CONTINUE command. This idea can be
implemented by extending each of the TYPE_IN commands in the program, as
: IF NOT COMPILED : TYPE_IN "CONTINUE" & CHR$(10) : STOP
Notice the STOP command at the end. This is important and is the secret. The
command stops the program and allows the typed_in command to execute, after
the CONTINUE command causes the program to continue. By doing it this way, all
commands will be executed separately, similar to how a compiled program would
Lee, can you please try the above suggestion and let us know how you get on.
QL-Users Mailing List