Microsoft® JScript JScript Keywords |
| Tutorial |
|
JScript has a number of reserved keywords. These words come in three types: JScript reserved keywords, those from Java, and words to avoid.
break | for | new | true | with |
continue | function | null | typeof | |
else | if | return | var | |
false | in | this | while |
abstract | default | implements | static | void |
boolean | do | import | super | |
byte | double | instanceof | switch | |
case | extends | int | synchronized | |
catch | final | interface | throw | |
char | finally | long | throws | |
class | float | native | transient | |
const | goto | package | try |
The words to avoid are any that are already objects or static functions. Words like String or parseInt are included in this.
Using any of the keywords from the first two categories causes a compilation error when your script is first loaded. Using a reserved word from the third set can cause odd behavior problems if you attempt to use both your variable and the original entity of the same name in the same script. For example, the following script does not do quite what you think it should:
var String; var text = new String("This is a string object");
In this case, you get an error saying that String is not an object. Many cases of using a pre-existing identifier aren't this obvious.
file: /Techref/language/asp/js/309.htm, 2KB, , updated: 1996/11/22 11:12, local time: 2024/8/31 17:11,
3.15.192.157:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://piclist.com/techref/language/asp/js/309.htm"> Microsoft® JScript </A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to piclist.com! |
.