}

Messages

1986/08/01 Iturriotz, J.M. Iturria: Elhuyar aldizkaria

12 lines of instruction are sufficient for the message of any length to pass through the right of the screen to the left for as long as desired.

The application of this program can be to visualize notes in store windows, publicize definitions, reveal notices or data or expand the political programs and slogans of the elections we just passed.

The program is structured in two lines of instruction.

20 LET L = LEN A$ and 100 PRINT AT 11, Z; A$ (P TO U)

The first contains the number of characters in the variable A$ (our message) in the variable L.

The second represents a part of the variable A$ (message), represented by the numerical variables P and U. With an example you will understand it immediately.

Let's imagine that we want to put a message on the video Industrial robots from Elhuyar. The same thing:

"IF YOU WANT TO SPEND TWENTY MINUTES AT EASE FOR A HEAVY TOPIC YES, THE VIDEO INDUSTRIAL ROBOTS IS ALREADY ON SALE (For more information visit ELHUYAR C/ Urbieta 7. Telephone number

a)

429945)."

This message has 200 characters including spaces. Therefore, when the instruction line 20 executes (executes) LET L=LEN A$, it will be worth L=200. Then print the first letter of the message to the right of the screen; then P=1 and U=1 the first two P=1 U=2 [A$ (P TO U)] and then write the full message. See images.

The screen does not exceed 32 characters on a horizontal line. Therefore, when the message is more than 32 characters, P+1 is made to print the 33 character, i.e.:

The message always ends with a vacuum. Otherwise, the last character of the message will be repeated 32 times with the dazzled screen.

To modify the message just make the message 10 LET A$=" and press ENTER and RUN below.

PROGRAM

C.M. Messages 1 REM ITURRIOTZ 1986 ©" 10 LET A$ = "If you want to spend twenty minutes to taste for a subject that is heavy in itself, is already on sale the video Industrial robots visit. Phone 429945" 20 LET L = LEN A$ :REM "Save number of characters" 30 LET Z = 31 REM "Open line of characters 0-31" 40 LET P = 1 :REM "First letter of the message" 50 LET = 1 :LET "Write the variable of variable length control" LET 100 IF

Note: The REM instruction has no effect on the program. No instructions REM works the same.

Gai honi buruzko eduki gehiago

Elhuyarrek garatutako teknologia