Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:47 13 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Passed parameter when using Chat.

Author Message
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 06:26am 19 Jun 2019
Copy link to clipboard 
Print this post

I have a procedure loaded on my E100:


SUB GetPos (addr)

Blah, blah, blah

END SUB


I run the procedure from MMEdit's terminal Chat and the first time;

GetPos 1

it works as expected but the second time, I get the error:

"ADDR" already defined

I am almost sure that I wasn't getting this error a couple of days ago(???)....Am I missing something?
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 08:52am 19 Jun 2019
Copy link to clipboard 
Print this post

Hi tinine

can you clarify the context
version of Micromite
did you set the parameter before the call like this exemple


dim var1 as integer
...
do
...
call sprog1(var1)
...
loop


sub sprog1(adr as integer)
bla bla bla
end sub

 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 11:15am 19 Jun 2019
Copy link to clipboard 
Print this post

Yes, I did all that...

I had a space between the procedure name and the parentheses. I removed the space and now all is fine...was that a no-no?
 
goc30

Guru

Joined: 12/04/2017
Location: France
Posts: 435
Posted: 12:31pm 19 Jun 2019
Copy link to clipboard 
Print this post

I have seen this space but I think that is was an keyboard error on copy of code in your post
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025