Learning bertsos
1986/04/01 Iturriotz, J.M. Iturria: Elhuyar aldizkaria
The program focuses on two matrices. to $ () and z $ ()
a $ () collects the original text.
z $ () the other text that is entered for the invitation.
You will know that you have to size the matrices. Here I used 2 dimensions in 30 and 40 lines. The number 15 that appears in it limits the number of characters of each variable. In other words, the variables will receive a maximum of 15 characters of the words, so if they are longer they will be saved in the cut memory. (you can change 15 by another number).
This time I want to explain a program to work the matrices.
The program consists of first asking the text, saving it in memory and then inviting it with the original when entering it by the keyboard, indicating the errors.
The program consists of three main parts:
The first from 80 to 170. It is to save the original text, if you click on the space you will not accept it (100 lines of instruction). If you also want to move from the line you are writing to the next one, cancel the remaining variables. (120-140).
Second (1000-1050). It is about correctly displaying the original text on the screen once saved, especially the instruction line 1030. This counts the letters of the variable to write and limits it to real measures, since we must remember that each variable has 15 characters and if the word "that" is entered the variable "that"
Third 200-360. Once deleted enter the same word by word, if you misenter it, when you invite the text Screen with the original, you will be prompted to reenter the word. Line 250 is very important for the program to run well. This makes that if there is any annulled variable in the original array, it also overrides the corresponding z $ ().
Example:
Once you type the program, clicking on run, you will be asked for the text measures. That is:
We will then enter the original text, for example:
The computer has already learned the bertso and now it is our turn.
The screen is deleted and is waiting for the verse we will enter, if the text we enter is different from the original, it will indicate that there is error and ask us to enter it correctly.
1 Learning verses. J.M. ITURRIOTZ m 1986 Cast the verse! |