Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

FUSING formatted string

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
atmega64

Bascom Member



Joined: 23 Feb 2005
Posts: 298
Location: ITALY

italy.gif
PostPosted: Fri Mar 08, 2019 8:31 am    Post subject: FUSING formatted string Reply with quote

Hi,

I have a single variable and I have to convert it to have a formatted string like ###. ##

With the following code I have: 0. 10

Code:

Config Single = Scientific , Digits = 1

Dim S As String * 7
Dim I As Single

Cursor Off
Cls

I = 0.1  
S = Fusing(i , "#.##")

Locate 1 , 1
Lcd S
 


how can I do?



(BASCOM-AVR version : 2.0.8.1 )
Back to top
View user's profile Visit poster's website
EDC

Bascom Expert



Joined: 26 Mar 2014
Posts: 971

poland.gif
PostPosted: Fri Mar 08, 2019 8:42 am    Post subject: Reply with quote

Try like this Very Happy
Back to top
View user's profile Visit poster's website
atmega64

Bascom Member



Joined: 23 Feb 2005
Posts: 298
Location: ITALY

italy.gif
PostPosted: Fri Mar 08, 2019 11:16 am    Post subject: Reply with quote

thanks... Very Happy Laughing
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum