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

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

From: Alain Pastor <apastor@...>
Date: Thu, 25 Oct 2001 02:45:11 +0200
Ken Shmidheiser wrote:
> 
> 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?
> 
I have tried different settings but I always got the same result.
I'm curious to know if the following line:
digit     = digit^^digitMask
can compile on other machines than ours.
At my end, I need to add a space character in front of the digitMask
variable before FB^3 accepts to compile that line.
The weird thing is that I can't reproduce what you are seeing. As to
me whether I change the ^^ symbol to XOR or not I always get the
same result (unprintable characters that is) using your original
code as well as using mine, which is rather a good news.
We're in serious need of clue.

-- 

Cheers

Alain

-----------------------------------------------------
FB^3 in Europe:  http://euro.futurebasic.com/
FB II Pouch:     http://www.pixmix.com/FB/outils.html
-----------------------------------------------------