Author Topic: regarding insert_line and inserting variables value  (Read 3793 times)

murali.sreekantan

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
regarding insert_line and inserting variables value
« on: May 20, 2007, 09:59:30 am »
Hi All,
I have been using slick edit for nearly a year. Now I have a problem.
the problem is like this
I am creating a macro to generate XML. I have line as below which will be inserted (the string is inside a for loop)

insert_line('<LEDGER NAME="Party number" RESERVEDNAME="">');

Instead of the number (the higlighted word) I need a value that will get incremented everytime the string goes through the for loop.
is there any way I can do it?
Regards
Murali

hs2

  • Senior Community Member
  • Posts: 2737
  • Hero Points: 288
Re: regarding insert_line and inserting variables value
« Reply #1 on: May 20, 2007, 10:46:36 am »
This is not too difficult due to the enhanced impl. type conversion of Slick-C:
Example:
Code: [Select]
   int number;  // or typeless
   for ( number = 0; number < 3; number++ )
   {
      insert_line('<LEDGER NAME="Party ' number '" RESERVEDNAME="">');
   }

Good luck,

HS2

murali.sreekantan

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: regarding insert_line and inserting variables value
« Reply #2 on: May 20, 2007, 10:57:47 am »
Hi,
Thanks for the reply.

Regards
Murali
« Last Edit: May 21, 2007, 01:10:12 pm by murali.sreekantan »