Path: utzoo!attcan!uunet!decwrl!ucbvax!MITCH.ENG.SUN.COM!wmb From: wmb@MITCH.ENG.SUN.COM (Mitch Bradley) Newsgroups: comp.lang.forth Subject: Re: C or Forth Message-ID: <9008201431.AA05686@ucbvax.Berkeley.EDU> Date: 19 Aug 90 00:38:30 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Mitch Bradley Organization: The Internet Lines: 10 > 3. Write a program that repeatedly calculates how many chars separate > two letters typed in by the user, until terminated with ctlC. : getchar ( -- char ) key dup emit dup 3 = abort" " ; : distance ( -- ) getchar getchar - abs 1+ . cr ; : go ( -- ) begin ." Enter 2 characters: " distance again ; That was too easy; am I missing something? Mitch