BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Wed Jul 18, 2018 3:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Problem with "REAL expression{\#maxdec}".....
PostPosted: Tue Oct 21, 2014 10:59 pm 
Offline
Citizen

Joined: Wed Mar 13, 2002 7:00 pm
Posts: 36
Hi
AtomPro40
XY = 12.34567
serout s_out, i9600, [" XY = ",real xy]
I get in the terminal: "XY = 12.34567" …ok
Now I would like to get: xy = 12.3
I try to use “\#maxdec”
I don’t understand how to use it or it does not work
In the Manuel is:
REAL{#maxint} expression{\#maxdec}
So I try:
serout s_out, i9600, [" XY = ",real xy #maxdec 1]
and also
serout s_out, i9600, [" XY = ",real xy \#maxdec 1]
but the compiler gives an error.
Please can someone explain me what I do wrong??
Heinz Germany


Top
 Profile  
 
 Post subject: Re: Problem with "REAL expression{\#maxdec}".....
PostPosted: Wed Oct 22, 2014 11:44 am 
Offline
Site Admin
User avatar

Joined: Fri Apr 12, 2013 8:38 pm
Posts: 87
Location: Nottingham, England, UK
HI

I think the problem here is you have \#maxdec 1 in the format, you do not need the #maxdec, try it with just :-

serout s_out, i9600, [" XY = ",real xy\1]

That should solve the problem,

Dave
BasicMicroUK
www.basicmicro.co.uk


Top
 Profile  
 
 Post subject: Re: Problem with "REAL expression{\#maxdec}".....
PostPosted: Thu Oct 23, 2014 5:15 pm 
Offline
Citizen

Joined: Wed Mar 13, 2002 7:00 pm
Posts: 36
Yes….That’s it .. And now I understand the manual too.
Thanks
Heinz


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO