Pages: « 1 2
  Print  
Author Topic: Enigma communication error  (Read 6190 times)
Offline (Male) notachair
Reply #15 Posted on: December 07, 2008, 01:36:46 AM

Definitely not a chair
Contributor
Joined: Feb 2008
Posts: 299

View Profile
Why is just putting /*  a bad habit? I only do it temporarily for debugging purposes.
I meant omitting */
Logged
Offline (Unknown gender) juggernaut
Reply #16 Posted on: December 07, 2008, 09:57:28 PM
Member
Joined: Apr 2008
Posts: 16

View Profile
Why is omitting */ a bad habit when I only to it temporarily to debug? Say there is a function in a script that ENIGMA doesn't recognise but then I want to test if another functionality is working, I will just put  /* at the start of the script to comment it all out, so it will not throw an error with the function. Afterwards I will of course remove the /* and then get the script the script to work but I was just testing without it first. I do this quite a lot in GM.
Logged
Offline (Unknown gender) score_under
Reply #17 Posted on: December 08, 2008, 06:59:54 AM

Member
Joined: Aug 2008
Posts: 308

View Profile
If you want to do that, do the sneaky trick of putting "/**/" at the end of each block of code. That way, you won't get a syntax error if you put /* at the start of that piece of code...
(Matching /* and */ are in red, commented-out code is in green)
Quote
some_functional_looking_code();
/* this thing */
would be changed into
Quote
/*
some_functional_looking_code();
/* this thing
*/

If anyone is colour-blind, just say the word! :D
« Last Edit: December 08, 2008, 07:06:05 AM by score_under » Logged
Offline (Male) Rusky
Reply #18 Posted on: December 08, 2008, 08:37:04 AM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
nesting quotes to one or two levels is not the entire topic.
and omitting */ is bad even if it's just for debugging. in anything but GM, people also use /**/ for debugging, but without the */ it won't compile.
Logged
Offline (Unknown gender) score_under
Reply #19 Posted on: December 10, 2008, 04:57:03 PM

Member
Joined: Aug 2008
Posts: 308

View Profile
nesting quotes to one or two levels is not the entire topic.
Quote nesting? Where?
Logged
Offline (Male) RetroX
Reply #20 Posted on: December 11, 2008, 04:55:50 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Here.

'\''
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) score_under
Reply #21 Posted on: December 12, 2008, 04:23:46 PM

Member
Joined: Aug 2008
Posts: 308

View Profile
Here.

'\''
Nesting≠Escaping.
Logged
Offline (Male) Josh @ Dreamland
Reply #22 Posted on: December 13, 2008, 03:20:02 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
[size=8]>_<[/size]
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: « 1 2
  Print