Path: utzoo!attcan!uunet!lll-winken!sun-barr!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!er225711 From: er225711@unix.cis.pitt.edu (Martin NMN Thurn) Newsgroups: comp.sys.mac.hypercard Subject: HELP with ScanToXxx HC glue routines!! Message-ID: <26250@unix.cis.pitt.edu> Date: 26 Jul 90 17:33:26 GMT Reply-To: er225711@unix.cis.pittsburgh.edu (Martin NMN Thurn) Organization: Computer-Accelerated Language Learning -- Understanding Written Japanese project, Pittsburgh PA Lines: 28 I'm having trouble with the HC callback routines ScanToXxx, etc. In particular, I am trying to put the "lines" of a HC variable into an array of str255's. Here is the hunk of code in question: Hlock(paramptr^.params[2]); Aend := paramptr^.params[2]^; scanToZero(paramptr, Aend); (* Aend now points to end of string (?) *) Aptr := paramptr^.params[2]^; numAnswers := 0; repeat numAnswers := numAnswers + 1; ReturnToPas(paramptr, Aptr, Answer[numAnswers]); ScanToReturn(paramptr, Aptr); until (longint(Aptr) >= longint(Aend)); (* never happens!! *) Hunlock(paramptr^.params[2]); This results in an infinite loop, i.e. Aptr never gets advanced to Aend. What it looks like is that ScanToReturn goes nowhere if the pointer is already on a #13. Gary Bond's examples are buggier than an Amazon picnic, does anybody know how to use these procedures? Thank you for your advice in advance. --Martin Thurn thurn@lcl.cmu.edu "I can never remember if my .signature is appended automatically" -- ---Martin Thurn thurn@lcl.cmu.edu "Wow! Someone at CMU who doesn't have a bunch of numbers and plus signs in their name!"