LB Booster
« USING() enhancement »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:43am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: USING() enhancement  (Read 363 times)
Jack Kelly
Full Member
ImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 106
xx USING() enhancement
« Thread started on: Aug 24th, 2016, 6:06pm »


If there is a future release of LBB, I would like to see a small enhancement to the USING() function -- a zero (0) template character which would create a non-significant leading zero, or accept a non-zero digit.

For example:
using("0#", 0) = 00
using("0#", 3) = 03
using("0#", 57) = 57

To achieve this currently, one must code a search and replace loop.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: USING() enhancement
« Reply #1 on: Aug 24th, 2016, 6:31pm »

Code:
data 0, 3, 57
for i = 1 to 3
    read x
    print right$("00";x, 2)
next
 
User IP Logged

Jack Kelly
Full Member
ImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 106
xx Re: USING() enhancement
« Reply #2 on: Oct 18th, 2016, 07:06am »

What about my idea for '0' as a template character. It would be very helpful especially in date routines where the user enters a one digit day or month and the date string requires 'mmddyy' for example.

I understand that Anatoly's suggestion is a next-best workaround.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls