SlickEdit Community

SlickEdit Product Discussion => SlickEditĀ® => Slick-CĀ® Macro Programming => Topic started by: StephenW on May 24, 2007, 12:07:07 AM

Title: Using name_info
Post by: StephenW on May 24, 2007, 12:07:07 AM
I do not understand the syntax for using name_info on a function.  For example, this compiles OK:

_command void test2(int message_number = 0, _str message_text = '') name_info(','VSARG2_MACRO) {
   message(message_number' 'message_text);
}

But this version does not:

_command void test2(int message_number = 0, _str message_text = '')
   name_info(','VSARG2_MACRO)
{
   message(message_number' 'message_text);
}

It gives an error message "Expecting '{'" and puts the cursor after the 'f' in name_info.  The only difference is whitespace, so why the problem?

This one, however, does work:

_command void test2(int message_number = 0, _str message_text = ''
) name_info(','VSARG2_MACRO)
{
   message(message_number' 'message_text);
}

As does this one, without name_info:

_command void test2(int message_number = 0, _str message_text = '')
{
   message(message_number' 'message_text);
}

This example code, from the V12.0.1 help file (in the "name_info Attributes" section), also does not compile:

_command void gui_enumerate()
       name_info(','VSARG2_REQUIRES_EDITORCTL|VSARG2_REQUIRES_AB_SELECTION)
{
    ...
}