Jump to content

How can I change the Stack Size in ST Office V10?

- - - - -

  • Please log in to reply
No replies to this topic

#1
Whitemage

Whitemage

    Newbie

  • Members
  • Pip
  • 1 posts
I'm currently working on macros with the program Smarterm Office v10 (year 2000) for a communication from pc-to-host.
I know this version is obsolete and I've found that Esker don't support it anymore, they only upgrade to V13 of course... and so I'm stuck with the problem...

I run this with a Windows XP SP3 PC.

Here's the simple problem...
The macros I write overflow the stack size and the program freezes.

The programming language is similar to C, here's an example just for fun:

Sub INTERRUPT

'! Code used to interrupt the running macro


MsgBox "Code interrupted by user."


Dim sFourStars = "****" as String


Session.Send sFourStars & chr(13) 

End

End Sub 


Sub Main

'! Macro used to LOGIN to the host


Call LOGI_1


If LOGI_1 = -1 then INTERRUPT


End Sub


Explanation of characters:
Dim is used to declare variables
Msg Box displays the string in between " ".
Session.Send sends the string or variable to the host.
chr(13) is a shortcut for Carriage Return (Enter).
End calls for the end of the code.

-----
The error I have is: "Out of Stack".
I get this only when I execute a lot of code like when call other functions inside another one.
The program don't crash immediately, but as soon as I execute any other code or try to edit it, it freezes.

Is there any way to modify the stack size so that I could execute more code without crashing?
Generally in compilers and code executing programs, where's the stack size declared? In the kernel?

I've searched in the .DLL and .INI files if there's some line for the stack size limit with no success...

I know that's pretty specific... but if anyone reading this have knowledge about this, please share it.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users