Functions Parameters Limition in EasyCode

Started by Danesh, August 07, 2005, 06:27:32 PM

Previous topic - Next topic

Danesh

Hi all,

I have defined a function in EasyCode which accepts 14 params as:

MyFunc proc private P1:dword, P2:dword,.....,P14:dword

but EasyCode can not build my project and it just return "An error occured" without showing which line has error. How can I define my func in EasyCode ? I also may define more input params so I need the problem to be solved fundementally.

Thanks,

Danesh


PBrennick

Danesh,
Ramon is on vacation right now.  I will look into your problem for you.  Could you please attach the project to a post so that I can better help you?

So as to do some testing while waiting to see your project, I added the following procedure to my EasyCalc project:


TestProcedure Proc Private P1:DWord, P2:DWord, P3:DWord, P4:DWord, P5:DWord, P6:DWord, P7:DWord, P8:DWord, P9:DWord, P10:DWord, P11:DWord, P12:DWord, P13:DWord, P14:DWord, P15:DWord, P16:DWord, P17:DWord, P18:DWord, P19:DWord, P20:DWord
;---------------------------------------
; This is a test procedure
        Ret
;---------------------------------------
TestProcedure ENDP


As you can see, I am using 20 parameters and the project built normally with no errors.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Danesh

Hi Paul,

Try this please:

MyFunctionNameIsLong Proc Private QueryPtr:DWord, AvailableSocket:DWord, AddressOfArray:DWord,
   ActualAddressOfArray:DWord, DBNamePtr:DWord, DBHandlePtr:DWord, ConnectionIP:DWord,
   HandlesArrayPointer:DWord, RowPtr:DWord, StoredRowPtr:DWord, X1:DWord, X222222:DWord, X22222222223:DWord

   
   Ret
MyFunctionNameIsLong EndP


It just says: Error Occured without showing which line of code has error. By omitting some vars and reducing input vars it will work fine.
I think EasyCode has a bug with long name vars or function names. I need it to be solved urgently. Actually, I evaluated all (almost all) visual platform form assembler and decided to use EasyCode and have based my serious development on EasyCode and I can not (and will not) migrate to another platform. I hope this bug be fixed very soon.

Thanks,

Danesh



Mark Jones

Hi Danesh, try this. (Do not put CR+LF in proc definition):


MyFunctionNameIsLong Proc Private QueryPtr:DWord, AvailableSocket:DWord, AddressOfArray:DWord, ActualAddressOfArray:DWord, NamePtr:DWord, DBHandlePtr:DWord, ConnectionIP:DWord, HandlesArrayPointer:DWord, RowPtr:DWord, StoredRowPtr:DWord, X1:DWord, X222222:DWord, X22222222223:DWord

   Ret
MyFunctionNameIsLong EndP
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

PBrennick

Mark,
I tried that.  It is a buffer overflow problem, thanks for the help, though.

Danesh,
I am able to reproduce your problem and it is specific to EasyCode, as you thought.  Ramon is using a 260 byte line buffer which is pretty standard.  Your line without the 2 CRLFs is 284 bytes.  For the moment, can you shorten a few of your parameters so that the line length is 260 bytes or less?  When Ramon comes back from vacation, I will talk to him about increasing the size of the line buffer.  I see that you are somewhat aware of what the problem is and that is why you added the two carriage returns.  Unfortunately, this good solution is negated when the line is picked up and the carriage returns are removed by the parser.

Normally, in a procedure we can use the back slash to overcome these type of problems.  It is not allowed here.  Too bad.  Anyway, try to remove 24 bytes for the time being.

BTW:  This is the message that Ramon sent to me,
Quote
... ... By the way! Could you reply Danesh in the forum? Thank you very much. I'll be back in 7-10  days

I don't want people to think I am assuming any kind of authority, here.
Paul
The GeneSys Project is available from:
The Repository or My crappy website

Danesh

Hi Paul,

Thanks for your help. I decresed length of some vars so far and now it works, but we need to add more vars very soon. So it will a temporary solution so far. This is a big project and we hope be able to publish it as an open source very soon.

Regards,

Danesh


PBrennick

Danesh,
I understand your plight.  The problem is that I do not currently hav the sources.  This is not a difficult fix and Ramon, as you probably know, has a track record of responding very quickly.  Thank you for your continued support of EasyCode and for your willingness to make a temporary change.  I know that more is involved than just adjusting that line as you also have to change every instance of each parameter you need to change.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

PBrennick

Danesh,
Ramon has just released a new version of EasyCode.  Please download it and use it to compile your project and all will work as you need it to.  I was mistaken about the line buffer overflow condition, it was a coincidence, actually.  There was another problem that caused your errors and Ramon has fixed it.  The length of the line buffer is 512 characters so you will be able to add more parameters with no problem.  Thank you for your patience and thank you for using EasyCode.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Danesh

Thanks Ramon and Paul for your support. I downloaded and installed new version. I have changed my input vars to short length names so far, but soon I need to add more vars.

Thanks again,

Danesh


PBrennick

Danesh,
You should be able to add them with no problem.  If you experience any difficulty, we will be here to help you.

Paul
The GeneSys Project is available from:
The Repository or My crappy website