home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / EPMASI.ZIP / CSYNTAX.ASI < prev    next >
Text File  |  1992-03-06  |  5KB  |  89 lines

  1. /**************************************************************************/
  2. /*                   C Syntax Assistance File - Example                   */
  3. /*                              Version 2.0                               */
  4. /*                 Sven Guyet, 03/92  (DSGUYE at DUESVM1)                 */
  5. /**************************************************************************/
  6. /*                                                                        */
  7. /* IF YOU WANT THIS FILE TO BE USED WITH ALL ".C" FILES, DON'T FORGET TO  */
  8. /* RENAME IT INTO MYAS_C.HLP !!!                                          */
  9. /*                                                                        */
  10. /**************************************************************************/
  11. /* NOTE: It is recommended to remove these comment lines in your "real"   */
  12. /*       syntax assistance file. The first time syntax assistance is      */
  13. /*       invoked via ALT-H, the file "MYAS_[filetype].HLP" is loaded      */
  14. /*       into the hidden ring. If "MYAS_[filetype].HLP" can not be found, */
  15. /*       the default file specified in my_syntax_filename is used.        */
  16. /*       Each time ALT-H is pressed the syntax assistance file is scanned */
  17. /*       for the specified command abbreviation. Therefore any            */
  18. /*       unnecessary lines increase the duration of the syntax evaluation.*/
  19. /*                                                                        */
  20. /* SYNTAX: For each command you wish to be expanded via ALT-H insert a    */
  21. /*         line starting with the command IN COLUMN ONE and followed      */
  22. /*         by the text you wish the command to be replaced with. Multiple */
  23. /*         lines are allowed. The end of the command description is       */
  24. /*         encountered either by the end of the syntax assistance file    */
  25. /*         or by a nonblank character in the first columns up to the      */
  26. /*         starting point of the first explanation line of the choosen    */
  27. /*         command.                                                       */
  28. /*         The cursor position after the replacement can be controled     */
  29. /*         by putting a '▓' (ascii 178) at the desired position within    */
  30. /*         the replacement string.                                        */
  31. /*                                                                        */
  32. /* EXAMPLE: The following C syntax assistance file entries ......         */
  33. /*                                                                        */
  34. /* Column !1      8          20                                           */
  35. /*------------------------------------------------------------------------*/
  36. /* Row  1 !FOR    for (▓; ; ) {                                           */
  37. /*      2 !         statement                                             */
  38. /*      3 !       } // end for                                            */
  39. /*------------------------------------------------------------------------*/
  40. /*                                                                        */
  41. /*           ...... would expand FOR with the above code between Row 1,   */
  42. /*           Col 7 and Row 3, Col 20 when ALT-H is pressed.               */
  43. /**************************************************************************/
  44.  
  45. /**************************************************************************/
  46. /*     C-STATEMENTS                                                       */
  47. /**************************************************************************/
  48. *      /***********************************************************************/
  49.        /* ▓COMMENT BLOCK                                                       */
  50.        /***********************************************************************/
  51. DO     do {
  52.          ▓statement;
  53.        } // end do
  54.        while (▓);
  55. FOR    for (▓; ; ) {
  56.          statement;
  57.        } // end for
  58. IF     if (▓) {
  59.          statement;
  60.        }
  61.        else {
  62.          statement;
  63.        } // end if
  64. MAIN   void main(int argc, char *argv[])
  65.        {
  66.          int ▓i;
  67.  
  68.          for (i=0; i<argc; i++) {
  69.            printf("Argument %2d: %s\n", i, argv[i]);
  70.          } // end for
  71.        } // end main
  72. SWITCH switch (▓) {
  73.  
  74.          case   : {
  75.            statement;
  76.          } break;
  77.  
  78.          default: {
  79.            statement;
  80.          } break;
  81.  
  82.        } // end switch
  83. CASE   case ▓: {
  84.          statement;
  85.        } break;
  86. WHILE  while (▓) {
  87.          statement
  88.        } // end while
  89.