The translation for READPOS in the Spanish version of FMSLogo is documented as "posLectura". However, when I run this, it outputs -1, as if to indicate that there is no reader.
The cause is that both READPOS and WRITEPOS are translated as "posLectura". The translation for "WRITEPOS" is added last and take precedence over the READPOS version. So when I run "posLectura", I'm actually running WRITEPOS.
The work around is to use the English command names: READPOS and WRITEPOS.
Repro:
1) Install and run the Spanish version of FMSLogo
2) Run the following example
; create a file
abreescritura "archivo.txt
ponescritura "archivo.txt
escribe 1
close "archivo.txt
; read the file
ponlectura "archivo.txt
muestra poslectura
muestra readpos
close "archivo.txt
What Happens:
The "muestra poslectura" prints "-1" and the "muestra readpos" prints 0.
Expected Result:
Both "muestra poslectura" and "muestra readpos" print 0.
Other Notes:
I found this while translating the manual into Spanish. This has not been reported by any user, which suggests that it's not a problem in practice. (Getting the READPOS is rarely useful).
It should be possible to automate a check for this class of problem. For example, when building the translation tables to add to the appendix, the script could look to see if a translation already exists when adding a new one. I think I didn't prevent this in general (a single name maps to two commands) because this does happen in practice. For example "rc" is "readchar" and "sqrt" in the Spanish version, but the Spanish translation "wins" over the English abbreviation, by design.
I have committed a fix [r4526]. It will be part of FMSLogo 7.3.0.
Related
Commit: [r4526]