Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 21:29 05 May 2024 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 : Problem with touch(y)

Author Message
flip
Senior Member

Joined: 18/07/2016
Location: Australia
Posts: 114
Posted: 12:17am 19 Jun 2017
Copy link to clipboard 
Print this post

Hi all,
Hoping someone can confirm what I'm doing is OK. I had something like the following in a program and it worked fine as a routine, but when I test a cut down version in command mode it always returns 0 for the x parameter(stored in variable a). the y parameter is correct.
Do a=Touch(x):b=Touch(y):If a>-1 And b>-1 Then print a,b ELSE b=b:EndIf:Loop

Same problem evident with 5.04.04 on a standard uMite and 5.03.o on a uMite+

eg. output like
0 162
0 163
...
Hope it's nothing like x being treated as a variable rather than a literal parameter?

PhilEdited by flip 2017-06-20
 
flip
Senior Member

Joined: 18/07/2016
Location: Australia
Posts: 114
Posted: 12:22am 19 Jun 2017
Copy link to clipboard 
Print this post

...interestingly when i try
Do b=Touch(y):a=Touch(x):If a>-1 And b>-1 Then print a,b ELSE b=b:EndIf:Loop


then the y variable gets lost...
e.g.
234 0
235 0
...

Regards,
Phil
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 01:32am 19 Jun 2017
Copy link to clipboard 
Print this post

You are missing the colon after "DO"
 
flip
Senior Member

Joined: 18/07/2016
Location: Australia
Posts: 114
Posted: 01:54am 19 Jun 2017
Copy link to clipboard 
Print this post

Hi Matherp thanks for that.

genius... fixed

Regards,
PhilEdited by flip 2017-06-20
 
Print this page


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

© JAQ Software 2024