<pre>function testISBN pCode  set cursor to 4  get testChar(pCode,"0123456789-Xx")  if it is true then    repeat      get offset("-",pCode)      if it is 0 then exit repeat else delete char it of pCode    end repeat    get last char of pCode    if it is in "Xx" then put 10 into N else put it into N    put the length of pCode - 1 into Z    repeat with P = 1 to Z      add char P of pCode * (11-P) to N    end repeat    get (N mod 11 = 0)  end if  return itend testISBN</pre>