home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 September (IDG) / Sep99.iso / Shareware World / Utilities / Text Processing / Alpha / Tcl / Completions / C++ Tutorial.cc < prev    next >
Encoding:
Text File  |  1998-04-16  |  1.2 KB  |  46 lines  |  [TEXT/ALFA]

  1.  
  2.           C++ Mode Completions
  3.  
  4. Use the 'back-quote' key to jump to the next completion, or just position the 
  5. cursor appropriately, and then hit the completion invoking key ('cmd-tab' 
  6. --default, 'tab' --alternative set).
  7.  
  8. (a) Here are some typical uses of electric completions:
  9.  
  10.     for◊
  11.  
  12.     while◊
  13.     
  14.     switch◊
  15.     
  16. (b) It's important spell long variable names correctly.  
  17.  
  18.     while(myVeryLongVariableName>0) {
  19.         my◊
  20.  
  21. (c) By pressing the invoking key multiple times, you can switch between any 
  22. number of alternative completions both above and below the insertion point.  
  23. If you cycle through all possibilities, the entire name is highlighted so 
  24. you can delete it easily if desired.
  25.  
  26.       int myOtherLongVariable = 0;
  27.     while(myVeryLongVariableName>0) {
  28.         my◊
  29.  
  30.         int myVariableBelow;
  31.         
  32.         
  33. (d) There is another way to quickly pull a variable or function name out of 
  34. the surrounding text.  Instead of typing the first few letters of a 
  35. multi-word identifier, type each letter that starts a word in that 
  36. identifier.  Completions of this sort are invoke by pressing 'cmd-<space>':
  37.  
  38.       int myOtherLongVariable = 0;
  39.     while(myVeryLongVariableName>0) {
  40.         mvlvn◊
  41.         molv◊
  42.         mvb◊
  43.  
  44.         int myVariableBelow;
  45.         
  46.