Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the last letter in the word "SlickEdit":
How many LETTERS are in the following? "a1b2c3":
Which number is missing?  "12345689":

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: ronw
« on: February 04, 2014, 05:49:51 PM »

I made an enhanced, second macro:
Code: [Select]
_command conde()
{
   parse arg(1) with symbol;
   box("#ifdef " :+ symbol, "", "#else\n#endif // " :+ symbol, "", "", "", "");
}

Which gave the following result:
Code: [Select]
#ifdef FEATURE
And a paragraph of text for
testing purposes.         
#else)#endif // FEATURE

There is a ")" where I expected the line break.

Looking through box.e, the only possible thing I found to explain this is:
Code: [Select]
s.blc=_UTF8ToMultiByte(s.blc);
Have I found a bug?
Posted by: ronw
« on: February 04, 2014, 05:25:13 PM »

I figured it out. I wrote a macro to call box with the "decorations" I want.

Code: [Select]
#include "slick.sh"

_command cond()
{
   parse arg(1) with symbol;
   box("#ifdef " :+ symbol, "", "#endif // " :+ symbol, "", "", "", "");
}
Posted by: ronw
« on: February 03, 2014, 11:30:21 PM »

From the message line, I can run:

box

and the current selection will be wrapped in a comment block.

Looking at box.e, it seems I should be able to run:

box '#ifndef DEBUG' '' '#endif' '' '' '' '' ''

and the selection will be wrapped with "#ifdef DEBUG" and "#endif".

But, I get the error "There are no comment block settings for '#ifdef'"

What am I doing wrong?