Author Topic: Is there a size limitation on a macro  (Read 4445 times)

seeplusplus

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Is there a size limitation on a macro
« on: January 14, 2022, 08:14:50 PM »
I am trying to load a macro built on another machine. But, if the size is above 3800 lines, I get "Runtime Error Position Found".

Is there a fix for that?


SlickEdit 2012 (v17.0.2.0 64-bit)

Serial number: FWB922119
Licensed number of users: 750
License server: 27100@license-wan-sd1

Build Date: August 09, 2012
Emulation: Visual C++ 6

OS: Windows 8 x64
OS Version: 6.02.9200 
Memory: 52% Load, 10606MB/20300MB Physical, 14056MB/41804MB Page File, 37553MB/134217727MB Virtual
Shell Info: C:\WINDOWS\system32\cmd.exe /q
Screen Size: 1920 x 1080

Project Type: Cpp
Language: .e (Slick-C)

Dennis

  • Senior Community Member
  • Posts: 3993
  • Hero Points: 520
Re: Is there a size limitation on a macro
« Reply #1 on: January 14, 2022, 09:27:43 PM »
The size limitations have been increased in more recent versions of SlickEdit.

The other option is to break the macro down into sub-modules.

If the module contains a lot of string data, you should consider loading the data from a data file, because lots of strings can lead to using a lot of macro byte code space.

Graeme

  • Senior Community Member
  • Posts: 2816
  • Hero Points: 347
Re: Is there a size limitation on a macro
« Reply #2 on: January 14, 2022, 10:41:28 PM »
You could try splitting in two and #including one of them into the other.  I don't know if this would work.  It depends where slickedit applies the limit.

You could also pre-process the file and look for lines ending in semi-colon  - then join the next line to the current line by removing the line ending  -  CR LF.  You can use the slick join_line command for this.

e.g. record a macro to search for semi-colon [whitespace] at the end of a line then call join_line.
 

Dennis

  • Senior Community Member
  • Posts: 3993
  • Hero Points: 520
Re: Is there a size limitation on a macro
« Reply #3 on: January 14, 2022, 10:45:37 PM »
There is no limit on the number of lines.  In fact, the error you get when a Slick-C macro is to large is "code size too large", indicating the amount of byte code generated exceeds the limit.

#include works like a C++ #include, so that is not going to cut the code size any.  But, if you break it into two modules, you can have the main module #import the other module.