ag93 ag93 - 1 year ago 223
Javascript Question

Javascript Unterminated string constant syntax

I am trying to get a js file to convert a .h file to a .cs file. I go to this point and it says "gencsinc.js(26, 153) Microsoft JScript compilation error: Unterminated string constant" the line that is 26 is below.

fout.Write('using System;\r\n\namespace PortableDeviceConstants\r\n\{\r\n\class PortableDevicePKeys\r\n\{\r\n\static PortableDevicePKeys()\r\n\{\r\n\');

hsz hsz
Answer Source

You are escaping last quote character:


Just remove the slash \ to close the string.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download