Board Logo
« BB___MID »

Welcome Guest. Please Login or Register.
Nov 20th, 2017, 10:19pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: BB___MID  (Read 1391 times)
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3614
xx BB___MID
« Thread started on: Sep 1st, 2010, 01:02am »

As of now, one of Hints in BB___MID article says:
Quote:
If you enter wrong index or number (negative, zero or bigger as the size of the string), you get an empty string.


However, it not 100% true.
I found that it kind of works with negative indexes:
Code:
a$ = "Just BASIC"
for i = -5 to 5
    print i, ">";mid$(a$, i,10);"<"
next
 

produces
Code:
-5            >Just<
-4            >Just <
-3            >Just B<
-2            >Just BA<
-1            >Just BAS<
0             >Just BASI<
1             >Just BASIC<
2             >ust BASIC<
3             >st BASIC<
4             >t BASIC<
5             > BASIC<
 

Now, this behaviour might be logical and may be even useful.

But I have no idea how to say about it in the article.
It's probably out ot normal usage pattern, so it don't have to be discussd in detail.
From the other hand, as for now, stating "you get an empty string" is just not true?
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Stefan Pendl
Administrator
ImageImageImageImageImage


member is offline

Avatar

Let's talk JB ...


Homepage PM

Gender: Male
Posts: 3711
xx Re: BB___MID
« Reply #1 on: Sep 1st, 2010, 03:27am »

Hope the rephrased paragraph and the example makes things clearer now.
User IP Logged

Stefan - Homepage

Remember to read the forum rules board wink

Just BASIC 1.01, Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3614
xx Re: BB___MID
« Reply #2 on: Sep 1st, 2010, 04:04am »

Stefan,
you made it really great.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls