home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / pascal / 7728 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  1.6 KB

  1. From: hemstree@mddchh.fc.hp.com (Charles H. Hemstreet IV)
  2. Date: Tue, 29 Dec 1992 16:12:53 GMT
  3. Subject: How forgiving is TURBO pascal concerning strings?
  4. Message-ID: <HEMSTREE.92Dec29091253@mddchh.mddchh.fc.hp.com>
  5. Organization: Hewlett Packard - Mechanical Design Division
  6. Path: sparky!uunet!usc!sdd.hp.com!hpscit.sc.hp.com!hplextra!hpfcso!hpfcmdd!hpfcmdd.fc.hp.com!hemstree
  7. Newsgroups: comp.lang.pascal
  8. Sender: news@hpfcmdd.fc.hp.com (News)
  9. Lines: 31
  10.  
  11.  
  12. With the following brief description below what is the expected result?
  13. Will Turbo pass by the comparison without an error?  I am also
  14. assuming that teststr[0] contains the value of the size of the string.
  15.  
  16. Thank you for any help,
  17.  
  18. Charles
  19.  
  20. ------------------
  21. teststr : string[100];
  22. testchar : char;
  23.  
  24. teststr := 'the is not a big string';
  25. testchar := 'a';
  26.  
  27. if testchar = teststr[0] then make a milkshake
  28. else milk the cow first
  29. ------------------
  30. --
  31. Charles
  32.  
  33. -------------------------------------------------------------------------------
  34. Charles H. Hemstreet IV                                 ********  h    *******
  35. Hewlett Packard                    /\          /\      *******   h        *****
  36. 3404 East Harmony Rd., MS110    /\/  \  /\    /  \     *****    hhhh pppp  ****
  37. Ft. Collins, CO  80525       /\/  \   \/  \/\/    \    ****    h  h p  p   ****
  38. (303) 229-4471              /  \   \  /   /  \     \   ****   h  h pppp   *****
  39. (303) 229-7182  (fax)      /    \   \    /    \     \  *****      p     *******
  40. hemstree@mddchh.fc.hp.com     Mech. Design Division     *******  p    ********
  41. -------------------------------------------------------------------------------
  42.