HyperCard 2.1: Fix for Address Stack Import Problem (8/92)

If the ZIP Code in an old HyperCard 1.x.x Address stack contains arithmetic
characters (+ - /) or letters (such as in Canadian postal codes), you may
encounter an "Expected Number" error when attempting to import the data
into the 2.1 Addresses stack. The script for this stack was changed from the 2.0 version to solve a similar problem but, this particular problem still exists.

To correct the problem in the 2.1 version of the Addresses stack, follow
the procedure outlined below. This procedure does not work in the 2.0
version of this stack.

1) Open the Addresses stack with the UserLevel set to 5.

2) Choose Bkgnd Info from the Objects menu.

3) The name of the background should be Body. Click on the Script button.

4) Choose Find from the Script menu and type the word "lastWord". Click
Find.

5) You should be brought to the section of code listed below. The second line
here contains an error.

if lastWord ¡ empty then
if offset(lastWord, "/-+") = 0 then
if value(lastWord) is a number then
put lastWord into theZip
delete last word of lastLine
end if
end if
end if

6) "Comment out" the second line by inserting two hyphens (--) in front of it
and add a new line directly underneath this line, as follows:

if lastWord ¡ empty then
--if offset(lastWord, "/-+") = 0 then
if offset("-", lastWord) = 0 and offset("/", lastWord) = 0 and┬
offset("+", lastWord) = 0 then
if value(lastWord) is a number then
put lastWord into theZip
delete last word of lastLine
end if
end if
end if

This article is adapted from the Claris Tech Info database.

Support Information Services
Published Date: Feb 19, 2012