Switch, Case and wild-cards?

Mark Wieder mwieder at ahsoftware.net
Fri Dec 28 21:40:39 EST 2012


Richmond-

Friday, December 28, 2012, 2:24:28 PM, you wrote:

> I have a string of characters in a language that go something like this:

> ZaXbbdsfZvfghXaasn

> now I have to "translate" those into a different type of representation; and
> the 3 "rubs" are these:

> 1. everytime I encounter a Z it must be moved after the next symbol's
> representation in the translation,

> 2. everytime I encounter an X it must be moved before the preceding 
> symbol's representation in the translation,

> 3. some of the symbols represented in the original string are 
> represented in translation by a single symbol,
>      some by double symbols, and a few by triple symbols.

I don't think that's going to work. Or there's information missing or
something. By those rules, the first Z moves to after the a. Then the
X no longer follows the a. Is that what's desired? Are rules 1,2, and
3 in order of precendence? Are these the *only* three rules? Rule
number 3 needs more fleshing out before anything can be done with it.
If the second Z moves after the v in vfgh and the second X moves
before the h in vfgh, does that break up a possible decryption of vfgh
or does it create a new fg phrase to be decrypted? I really hate to go
in this direction, but my guess is that you need more rules.

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the use-livecode mailing list