[Info-vax] Wordle on VMS ?
Supratim Sanyal
supratimdeleteme at riseremovemeup.net
Tue Jun 7 23:27:00 EDT 2022
On 6/7/22 8:27 PM, Arne Vajhøj wrote:
>
> The code linked in the article build on VMS with 3 tiny changes:
>
> 63 fconnect(inwords, 'vfile_ words.txt');
> ->
> 63 open(inwords, 'vfile_ words.txt', old);
>
> 75 fclose(inwords);
> ->
> 75 close(inwords);
>
> 108 chosenword := wordlist[trunc(clock) mod MAX_WORD_INDEX];
> ->
> 108 chosenword := wordlist[clock mod MAX_WORD_INDEX];
>
> Arne
Just saw this, and exactly so, though I used "readonly" instead of
"old". It also compiles on linux with
63c63
< fconnect(inwords, 'vfile_ words.txt');
---
> assign(inwords, 'words.txt');
75c75
< fclose(inwords);
---
> close(inwords);
108c108,110
< chosenword := wordlist[trunc(clock) mod MAX_WORD_INDEX];
---
> //chosenword := wordlist[trunc(clock) mod MAX_WORD_INDEX];
> randomize;
> chosenword := wordlist[ random(9223372036854775807) mod
MAX_WORD_INDEX];
anyway, quick link for anyone wanting to avoid the edit/compile cycle -
https://bit.ly/wordle-vms
More information about the Info-vax
mailing list