Hi all,
Does anyone know what LanguageNumbers is used for? As it stands (correct me if I’m wrong)
An array should be given of words having type . These should include enough to express the numbers 1 to 20, as in the example:
Array LanguageNumbers table
’un’ 1 ’une’ 1 ’deux’ 2 ’trois’ 3 ’quatre’ 4 ’cinq’ 5
’six’ 6 ’sept’ 7 ’huit’ 8 ’neuf’ 9 ’dix’ 10
’onze’ 11 ’douze’ 12 ’treize’ 13 ’quatorze’ 14 ’quinze’ 15
’seize’ 16 ’dix-sept’ 17 ’dix-huit’ 18 ’dix-neuf’ 19 ’vingt’ 20;
No idea why it should be given!
I can’t seem to access it: LanguageNumbers-> or LanguageNumbers–>, 2*n or n, all that comes out of “print (string) LanguageNumbers->n” is garbage…
What am I missing? Thanks!
zarf
(Andrew Plotkin)
February 27, 2015, 11:32pm
2
This is an array of dict words (not strings) and the integers they map to. It’s used by the NumberWord() function in parserm.h. (In 6/11 anyhow. Haven’t looked at 6/12.)
Since it is a table, you access it with LanguageNumbers–>N, where N ranges from 1 to LanguageNumbers–>0.
To print a dict word, use “print (address) foo”.
DavidG
(David Griffith)
February 28, 2015, 8:09am
3
The usage is the same in 6/12.
Thanks a lot, as always! Github’s search function had overlooked NumberWord()