Subj : Baja feasibility
To   : Digital Man
From : Hausmaus
Date : Sat Nov 15 2003 02:23 pm

(NOTE: If anyone else besides DM has an answer to my questions, please let me
know.)

DM,

I have a question for you concerning porting one of my doors from Pascal to
possibly Baja.  I'd like to try porting my door "The Magic Oracle" from
Pascal to Baja.  In a short nutshell, here's what it does from start to finish:

Sees if INDEX.DAT is existant (a simple integer that tells how many lines of
text are in the answer file).  If not, count ANSWERS.DAT (a text file) and
record in INDEX.DAT how many files there are.
Get user's question.
Pick random number from 1 to INDEX
Get answer(index)
Show answer(index)

Now I know it sounds silly to be asking this, but is there random number
capabilities in Baja?  I've been reading over the docs and I haven't seen
anything yet (or perhaps I skipped over it).  I'd like to do it in Baja so it
would be backwards-compatible with older versions of Sync, but if it can (or
should be) written in JS, then I'll just wait until I can devote a little more
time to learning JS.

Ideas or suggestions?

--HM

---
� Synchronet � Midnight's Hour BBS - midnightshour.org