Multi-Edit's Top Bar Image - Click here to Return to the Home Page spacer image for website layout News regarding our IDE -click this image- Products of MESI Page -click this image- Support Avenues, Forums, Emails etc. -click this image- Purchase Online -click this image- Resources, Downloads, Zips for Mult-Edit -click this image- Company NFO -click this image- Website Sitemap -click this image-

- Written and documented by David Deley



Introduction to CMac Chapter 4: Make_Message

MAKE_MESSAGE() is useful when you are debugging macros. The output goes to the message line at the very bottom left of the Multi-Edit screen. Try the following macros:

Code:
macro_file mycmac;
void testint()
{
  int i = 12;
  make_message('i=' + str(i));
}

void testhex()
{
  int j = 0x5A7A;
  make_message('j=0x' + hex_str(j));
}

void testreal()
{
  real pi=3.14159265358;
  make_message('pi=' + Rstr(pi,7,4));
}

void teststr()
{
  str hi='Hello World';
  make_message('hi="' + hi + '"');
}

void testall()
{
  int i = 12;
  int j = 0x5A7A;
  real pi=3.14159265358;
  str hi='Hello World';
  make_message('i=' + str(i) +
               ' j=0x' + hex_str(j) +
               ' pi=' + Rstr(pi,7,4) +
               ' hi="' + hi + '"' );
}

Sometimes you need to pause execution of the macro so you have time to read the message. This can be done by adding a call to READ_KEY after the MAKE_MESSAGE

Code:
macro_file mycmac;
void testpause()
{
  int i = 12;
  int j = 0x5A7A;
  real pi=3.14159265358;
  str hi='Hello World';
  make_message('i=' + str(i) +
               ' j=0x' + hex_str(j) +
               ' pi=' + Rstr(pi,7,4) +
               ' hi="' + hi + '" Press any key...' );
  read_key; //Pause, wait for user to press a key
  make_message('Thank you.');
}