Does mikroBasic have ByteToStrWithZeros ?

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
arvinfx
Posts: 115
Joined: 22 Feb 2010 18:44

Does mikroBasic have ByteToStrWithZeros ?

#1 Post by arvinfx » 23 Apr 2012 20:45

I really need to make a good shape clock , But I couldn`t format numbers in this style 04:09!
How do I make this guys?

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Does mikroBasic have ByteToStrWithZeros ?

#2 Post by janko.kaljevic » 24 Apr 2012 08:53

Hello,

At the moment we do not have function that will do this thing, but you can make very easily.
For example:

Code: Select all

  Lcd_Chr(2, 6, (hours div 10)   + 48)
  Lcd_Chr(2, 7, (hours mod 10)   + 48)
  Lcd_Chr(2, 8, ":")
  Lcd_Chr(2, 9, (minutes div 10) + 48)
  Lcd_Chr(2,10, (minutes mod 10) + 48)
This will display hours and minutes in desired format.

Best regards.

arvinfx
Posts: 115
Joined: 22 Feb 2010 18:44

Re: Does mikroBasic have ByteToStrWithZeros ?

#3 Post by arvinfx » 24 Apr 2012 10:48

Thank you , it works now :) .

Why this forum does not have a thank buttom!

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: Does mikroBasic have ByteToStrWithZeros ?

#4 Post by janko.kaljevic » 25 Apr 2012 10:31

Hello,

I am very glad that you have solved this.
Thanks for suggesting. We will consider it.

Best regards.

arvinfx
Posts: 115
Joined: 22 Feb 2010 18:44

Re: Does mikroBasic have ByteToStrWithZeros ?

#5 Post by arvinfx » 06 May 2012 13:15

And also a resolved tag or flag on subjects or search engine might be helpfull for us and you.
Beast regard

Megahurts
Posts: 900
Joined: 01 Oct 2009 22:48
Location: Rocky Mountains, USA.

Re: Does mikroBasic have ByteToStrWithZeros ?

#6 Post by Megahurts » 14 May 2012 20:37

arvinfx wrote:And also a resolved tag or flag on subjects or search engine might be helpfull for us and you.
Beast regard

Hi Guys,

I second that request. It would help users find solutions a lot faster.

Mhz.
HW: easyPIC5|PICFlash2|easyBT|smartGSM|easyGSM|PICPLC16|mmWorkStation|FT800 Eve|PIC Clicker/2|
MMBs:PIC18F,PIC33EP,PIC32|CLICKs:DAC,ADC,GPS L10,Thermo,8x8B LED,Stepper,W/B OLED,9DOF,GPS3,tRF,Hall I|

SW: mP for PIC|mB for PIC-dsPIC-PIC32|Visual-TFT|

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: Does mikroBasic have ByteToStrWithZeros ?

#7 Post by zristic » 15 May 2012 10:54

We hesitate to install third party "Mods" for phpBB, because updating the forum then is a nightmare, that's talking from experience.
In order to make Google index it the way you wish, just put "[Solved]" in the topic title and you will get the same effect.

Post Reply

Return to “mikroBasic PRO for PIC General”