_TITLE "Scampling" 'B+ translated from JB to QB64 only changingmsg$() and adding this line, 2019-12-26 'scampling.txt for JB v1.01 [B+=MGA] 2016-05-15
'modified for JB from scampling.bas SmallBASIC 2015-09-02 MGA/B+
'2018-12-27 need Randomize
'2018-12-27 oops missed RND(0)
PRINT RND(0) ' always returns the last value returned
'see if scample$ can unscramble some of following by accident
msg$(1) = "its kdnda lkie redaing tihs mesasge. If you go wtih the folw, you knida get the gist of waht I was tyring to say LOL"
msg$(2) = "(old trick on how peoples minds can be when reading. we just fill in the gaps) "
msg$(3) = "THIS MESSAGE SHOWS YOU, THAT THE CAPABILITIES OF YOUR BRAIN ARE REALLY GREAT!"
punc$
= " <,>.?/:;'{[}]|\!@#$%^&*()_-+=" + CHR$(34)
lastp = 0: build$ = ""
wrd$
= MID$(msg$
(m
), lastp
+ 1, i
- lastp
- 1) build$
= build$
+ scample$
(wrd$
) + MID$(msg$
(m
), i
, 1) lastp = i
wrd$
= MID$(msg$
(m
), lastp
+ 1) build$ = build$ + scample$(wrd$)
flaglower = 0
IF flaglower
THEN 'just mess up the word a little, leave first and last letter the same wrd$
= MID$(wrd$
, 1, lp
- 1) + MID$(wrd$
, lp
+ 1, 1) + MID$(wrd$
, lp
, 1) + MID$(wrd$
, lp
+ 2) ELSE 'all upper case letters so do a different substition numbers for letters and vice versa bld$ = ""
bld$ = bld$ + s$
wrd$ = bld$
scample$ = wrd$