Subj : 2 questions
To   : echicken
From : DesotoFireflite
Date : Sat Apr 09 2022 07:38 am

 Re: 2 questions
 By: echicken to DesotoFireflite on Sat Apr 09 2022 03:56 am

ec> Re: 2 questions
ec> By: DesotoFireflite to All on Fri Apr 08 2022 17:45:57

De>> 1. - When I use console.gotoxy(0,24); it takes me to line 22, not
De>> 24. Is this a normal thing +/- a few lines, or is it supposed to be
De>> dead accurate.

ec> I believe these coordinates are 1-based, so the top left cell is 1,1. Even
ec> so I would only expect you to end up one row above where you intended. Not
ec> sure what's up with that.

I was going to work on it some today. Nightfox reminded me about the "1 Bassed" reference yesterday, and I had not taken that into my thoughts.

ec> FYI if your intention is to move to the first column of the last line in
ec> the terminal, I would recommend:

ec> console.gotoxy(1, console.screen_rows);

Wow, I didn't even see that in the Sync JS Object Model Reference, Thanks, I am going to try this, as it sounds to be just what I'm looking for.

ec> This will get you there no matter what the dimensions of the terminal are.
ec> (There is also a 'screen_columns' property.)


De>> 2. - what are the { and } used for. As far as I can tell be reading
De>> up, they are only deed for condition statements. Just trying to
De>> understand.

ec> Curly braces do a few different things in JS, but mostly they're creating
ec> a 'block' to group several statements together. If your 'if' statement
ec> only needs to do one thing, then you don't need them:

OK, I am onboard with this now, I'm just going to have to practice it abit to get familiar with it. I'm going to work on converting one of my baja mods into js. This should be quite a learning experience. As alway, thanks.

SysOp: C.G. Learn, AKA: DesotoFireflite
Valhalla Home Services! - (Synchronet) - bbs.valhallabbs.com:23
A Gamers Paradise - Over 250 Registered Online Game Doors!

--- Don't eat the yellow snow!
� Synchronet � Valhalla Home Services � USA � http://valhalla.synchro.net