Add LEFT$ and RIGHT$ String functions

Post your requests and ideas on the future development of mikroBasic.
Author
Message
LenG
Posts: 19
Joined: 10 Dec 2008 19:09
Location: Los Angeles, CA

Add LEFT$ and RIGHT$ String functions

#1 Post by LenG » 10 Dec 2008 19:16

This compiler is better than most, partially because it handles strings. It would be nice to add the common BASIC 'left$' and 'right$' (and maybe even 'mid$') string functions as well.

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

#2 Post by marko.ziv » 17 Dec 2008 09:48

Hi,

are you referring to functions ltrim and rtrim
(left trim and right trim)?
If so it will be implemented in new PRO version of our compilers for PIC

Regards

LenG
Posts: 19
Joined: 10 Dec 2008 19:09
Location: Los Angeles, CA

#3 Post by LenG » 17 Dec 2008 17:10

Yes. That's them! Thanks. :lol:

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#4 Post by Dany » 17 Dec 2008 19:13

circuitpro wrote:Yes. That's them! Thanks. :lol:
:?: The basic functions Left$ and Right$ return a number of characters at the beginning resp. the end of the string, while "trimming" is removing spaces at the beginning resp. the end of the string. So the functions are (I think) totally different. :oops:
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

LenG
Posts: 19
Joined: 10 Dec 2008 19:09
Location: Los Angeles, CA

#5 Post by LenG » 17 Dec 2008 20:00

I didn't realize trimming referred exclusively to spaces. If that's the case, then the ability to CHOP spaces or characters from a string's LEFT and RIGHT end would be far more useful, at least to me. I didn't understand the space-only distinction.

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

#6 Post by marko.ziv » 18 Dec 2008 09:54

circuitpro wrote:I didn't realize trimming referred exclusively to spaces. If that's the case, then the ability to CHOP spaces or characters from a string's LEFT and RIGHT end would be far more useful, at least to me. I didn't understand the space-only distinction.
Like been said earlier, we will implement ltrim and rtrim functions in new PRO version of our compiler for PIC. We are working on this right now.

Regards

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#7 Post by Dany » 18 Dec 2008 11:55

Hi,
Left$, Right$ and Mid$ are all special cases of the "Copy" function in http://users.edpnet.be/rosseel01/DRO/PI ... Utils.ppas. In Pascal, but the code can easily be converted to Basic... :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

kotg
Posts: 148
Joined: 13 Jan 2007 19:30
Location: Sunny So. Cal.
Contact:

#8 Post by kotg » 19 Dec 2008 02:37

PRO VERSION of compiler?

What is this?
[b]"So many wasted hours...such a simple solution"[/b]
Check out my website to see what this Geek is up to.... www.TheGeekKing.com.

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

#9 Post by marko.ziv » 19 Dec 2008 10:09

Hi,

maybe you were not aware that we started releasing PRO versions of our compiler.
This is already done for our AVR compilers, (you can find it on this forum in AVR section).
The main features are new bit variables and new graphic IDE.
We expect beta versions of PRO version compilers for PIC family to be released in January.
When this happens (there will be an official announcement) you are all welcome to test it.

Regards

kotg
Posts: 148
Joined: 13 Jan 2007 19:30
Location: Sunny So. Cal.
Contact:

#10 Post by kotg » 20 Dec 2008 01:33

This leads to the next question - will registered owners of MEbasic ver. 7 have to pay for the PRO version?

I notice that the AVR PRO version is more expensive then the standard, so I guess it is a separate (and more expensive) version.
[b]"So many wasted hours...such a simple solution"[/b]
Check out my website to see what this Geek is up to.... www.TheGeekKing.com.

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

#11 Post by marko.ziv » 22 Dec 2008 09:58

Hi,

this is a management issue that is still "on the table"
being decided. When we are little closer to release of new PRO compilers
for PIC we will have an answer to this question.

Regards

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

#12 Post by marko.ziv » 22 Dec 2008 10:04

Hi,
kotg wrote:I notice that the AVR PRO version is more expensive then the standard, so I guess it is a separate (and more expensive) version.
It is separate version for AVR because when we make official release of all three compilers for AVR
(C, Pascal and Basic), the old versions of AVR compilers will become obsolete.

Regards

ralphrmartin
Posts: 137
Joined: 10 Mar 2005 22:59
Location: Cardiff, UK
Contact:

#13 Post by ralphrmartin » 22 Dec 2008 12:07

Can you please summarise the main differences between the new PRO compilers and the old ones, as a comparative list?

User avatar
marko.ziv
mikroElektronika team
Posts: 531
Joined: 06 Dec 2007 10:11
Contact:

#14 Post by marko.ziv » 23 Dec 2008 14:13

Hi,

in short notes two main differences between old version and a PRO version is that in the PRO version we have introduced bit variables, and new graphical IDE (as already seen in compilers for 8051 and AVR family of MCUs).
We are very optimistic about bit variables because tests have shown that compiler produces 30-40% less machine code (if you compare the same code in new compiler with the old one).
New IDE has a lot of new features and many improved old ones, library manager (with a simple click you you enable/disable the given hardware library for your project) and many more.
Hope this helps.

Regards

LenG
Posts: 19
Joined: 10 Dec 2008 19:09
Location: Los Angeles, CA

After 4 years, no ltrim or rtrim?

#15 Post by LenG » 07 May 2012 17:37

It looks like ltrim and rtrim never made it. :(

Post Reply

Return to “mikroBasic Wish List”