Comet32 bug in MOVE( )


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Robert G Laurin on January 03, 2012 at 12:32:36:

Bad programming sometimes yields bizarre results in Comet32

Found that these lines work in Comet16 but not in Comet32

Let Account$ = Strip(SFAccount$)
If View NE Yes and _ ! Do Not Allow Operator to View Account #
Account$ < 'A' ! Account is not Alpha Text
Let X = Len(Account$) - 4
Move('**************',Account$,1,X) ! Fill all but last 4 digits with '*'
Endif

This Code will Mask the beginning of a Credit Card number and leave only 4 last digits visible.

What this code fails to do, is verify if Account$ is empty.
In Comet16, MOVE with a negative X (minus 4 if Account$ is empty) would yield an unchanged and still empty Account$
In Comet32, I get all the 14 '*' followed by some junk characters...

I will fix my code but i think Comet32 should not override the active length when MOVE is used and should make sure X is greater than 0



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]