Subj : 2 questions
To   : DesotoFireflite
From : Nightfox
Date : Fri Apr 08 2022 04:59 pm

 Re: 2 questions
 By: DesotoFireflite to All on Fri Apr 08 2022 05:45 pm

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

console.gotoxy() should be exactly accurate.  Note that the X and Y cursor coordinates are 1-based.  You may be off by 1.

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

There are several things { and } can be used for.
1. To surround blocks of code that contain more than one statement, such as:
if (x === 1)
{
  console.print("x is 1");
  console.crlf();
  console.pause();
}

2. When defining functions:
function printNumber(num)
{
  console.print(num);
}

3. When defining objects:
var anObj = {
  aNum: 1,
  aString: "String"
};

There may be more cases I'm not thinking of.

Nightfox

---
� Synchronet � Digital Distortion: digitaldistortionbbs.com