home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Snippets / NewHelp 1.0.1 / NewHelp / NewHelp.rsrc / TEXT_156_Onward.txt < prev    next >
Encoding:
Text File  |  1995-12-31  |  2.6 KB  |  21 lines

  1. From Then, On:
  2.  
  3. Once past the typedefs, the global variables will be mostly ready to go exactly as they are.  And the rest of the file will be relatively easy to edit.
  4.  
  5. If CTools‚Ñ¢ hits a ‚ÄúStr4[4]‚Äù it will scramble it with a previous type.  Just look at the Pascal file and see how it‚Äôs supposed to be and fix it.  This is just another thing on my list of things to correct (will it ever end!).
  6.  
  7. The biggest ‚Äúpest‚Äù of the editing process is screwed up character case.  It may say ‚ÄúitemHit‚Äù 20 times in the file, and one or two times it will say ‚ÄúItemHit‚Äù or ‚Äúitemhit‚Äù or even ‚ÄúITEMHIT‚Äù.  My KodeKeys macros handle this.  And, whenever you encounter ANYTHING that gives a compiler error, correct it for the rest of the file right then and there.
  8.  
  9. One important thing is, when you use Find/Replace, be SURE you evaluate whether to set ‚ÄúIgnore Case‚Äù, ‚ÄúWrap Around‚Äù and ‚ÄúWhole Words‚Äù FIRST.  The ‚ÄúSelection - Replace All‚Äù KodeKeys sequence I just mentioned MUST have ‚ÄúWhole Words‚Äù checked before using it.  Otherwise it will mess up some things.
  10.  
  11. Using Find/Replace for C source from a Pascal conversion is an art, to selectively edit the whole file precisely.
  12.  
  13. Sometimes you will fix something in the rest of the file and it will mess up something you already edited.  Should‚Äôve had ‚ÄúWrap Around‚Äù unchecked!  See?
  14.  
  15. The oddball character case boo-foos usually show up with the ‚Äúxxxx has not been declared‚Äù compiler error, but you KNOW it has already been declared (the ONE exception to this is in a ‚Äúwith‚Äù block).  So, it was declared and used earlier, but with one or more characters in the wrong case.  I can correct this so it‚Äôs automatically handled.  Until then...  (ho hum)...
  16.  
  17. The quickest way to handle this is to get the one where you are like you want all of them to be, select it, copy it, and paste it in the Find dialog for both the search string and the replace-with string, and then Replace All (Whole Words checked).  Editing this one word for character case is made easy by having a macro in CMaster‚Ñ¢ to invert case.  I do this with one key hit of the ‚Äúback accent‚Äù key (upper left of keyboard).  I‚Äôve never used that character for anything else, so I use it for that.  I hit it and the next character gets inverted, case-wise.  Or on a selection and the entire selectio inverts case.  EXCELLENT!  Handy!
  18.  
  19. For those of you using KodeKeys, simply edit the word to your liking (don‚Äôt add or subtract characters), select it, then hit ctrl-[0] (control, keypad 0) and the sequence will be executed.  It‚Äôs mega-fast and easy!  (Make sure ‚ÄúWhole Words‚Äù is checked before doing this.)
  20.  
  21.