Newsgroups: comp.sys.mac.hypercard Path: utzoo!lsuc!dave From: dave@lsuc.on.ca (David Sherman|LSUC|Toronto) Subject: Re: a bug in the go command (i think! ) Message-ID: <1990Mar16.001124.3744@lsuc.on.ca> Summary: not a bug Organization: Law Society of Upper Canada, Toronto References: <16871@orstcs.CS.ORST.EDU> Date: Fri, 16 Mar 90 00:11:24 GMT abdenour@mist.CS.ORST.EDU (Abdennour A. MOUSSAOUI) writes: >I think there is a bug in the go command! > >go to card "14" it doesn't go to card named "14" but instead it goes to card > number 14. (assuming they aren't the same cards) >so that (go to card "14") behaves just like (go to card 14) It's not a bug. It's a result of the totally loose typing in Hypercard variables. There is NO DISTINCTION between "14" and 14; they are identical for all purposes in Hypertalk. When you say "go to card xyz", it evaluates xyz; if it's a number, Hypercard assumes you mean the card number; otherwise, it tries for a card with that name. Moral: don't give cards names which are numbers. There are some other really strange effects of Hypercard's "programmer-friendly" design: "book" = "Book" evaluates to true "book" > "Book" evaluates to true "book" <= "Book" evaluates to false That's because >, <, >= and <= all mean arithmetic comparison, where ASCII 'b' is after ASCII 'B', while '=' (or "is") means textual comparison, which is case-insensitive. Beware! David Sherman Toronto -- Moderator, mail.yiddish { uunet!attcan att utzoo }!lsuc!dave dave@lsuc.on.ca