Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:30 12 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 VAL(

Author Message
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 05:48pm 20 Feb 2015
Copy link to clipboard 
Print this post

Gday All,

I have discovered what I think is a bug in VAL or maybe I am just stupid or maybe both.

a$="a"
Print Val(a$)

Returns 0 instead of expected 97

And similarly if the string has a value of "&" it returns Error: Invalid prefix

I know I am crazy but I dont think I have done anything wrong here.

I am using ver 4.6 (not 4.6a or b)

Regards,

Mick


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 05:59pm 20 Feb 2015
Copy link to clipboard 
Print this post

Ignore that,

I AM Crazy..

Val(a$) is not what I want ASC(a$)

Sorry for that


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9073
Posted: 06:41pm 20 Feb 2015
Copy link to clipboard 
Print this post

If it makes you feel any better Mick, I have tripped on that one more then once too.

Now, if a$="97", then as you know(now!) Print Val(a$) would print 97 on the screen.

Still, it is a very useful command when you need it.(Val, I mean)
Smoke makes things work. When the smoke gets out, it stops!
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 10:15pm 20 Feb 2015
Copy link to clipboard 
Print this post

Thanks Grogs,

I feel good in knowing I am not the only `Goose' in the world.

Now you know why I programme with my soldering iron.

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Print this page


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

© JAQ Software 2024