[futurebasic] Re: [FB] FN SCRAMBLE$/UNSCRAMBLE$

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2001 : Group Archive : Group : All Groups

From: Ken Shmidheiser <k.shmidheiser@...>
Date: Wed, 24 Oct 2001 17:18:28 -0400
Heather asked:

>  >Whatever the garbage characters were, the Associate server didn't
>  >like them and clipped my message.
>  >
>  >Here is the rest of it (I have substituted asterisks for the
>  >unprintable characters.)
>
>They weren't really garbage characters, the email font didn't have a
>printable character for them.  They are all control characters, if
>you change your font to VT100 you'll see them.
>
>^v^x^s^y^k^k^g^q ^tab
>
>That brings up a good point, do you want your scramble function to
>produce control or unprintable characters?


Heather,

To be usable, the scramble function should produce a readable, 
although scrambled, word. Running my version of the functions on a 
B&W G3 350 the functions run just fine and produce the following 
scrambled-word output when seeded with "futurebasic" as the word to 
be scrambled, and "alain" as the key:

kzyzwjgfxnh

I believe the problem may be in this line:

digit     = digit^^digitMask

found in each function. When I substitute this:

digit     = digit XOR digitMask

my function breaks and produces the unprintable control characters. 
Alain tells me his Compiler chokes on the first syntax using the ^^ 
shorthand. Could this be caused by one of my preferences?

One thing I forgot to mention that may make a difference is that I am 
running FB^3 b5.

If I can find a solution, I'll build a little password app with the 
functions as a demo.

Thanks for your insights.

Ken