🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #15286

JS: bad switch statement brings down ID

#15286
From: Peter_Kahrel
Date: Wed, 10 Dec 2003 19:06
11 lines
977 bytes
In Javascript, a syntax error in a switch statement brings down ID CS:

switch( x )
  {
  case 1 , 2 : return this;
  case 3 , 4 : return that;
  }

I was hoping that this construction would work (case 1 or 2, case 2 or 3) as it does in Pascal and C, but it crashes ID. Using semicolons (case 1 ; 2) doesn't crash ID, but it has no effect at all. Just to warn you.

Peter
Technical Details
Message-ID: <2ccedbfe.-1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,dd463b97b240c9d4,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-12-10 11:08:02 PST
From: Peter_Kahrel@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: JS: bad switch statement brings down ID
Message-ID: <2ccedbfe.-1@webx.la2eafNXanI>
Date: Wed, 10 Dec 2003 11:06:41 -0800
Lines: 13
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit