Daniel Smith | 408bd9f | 2024-07-25 20:54:57 +0200 | [diff] [blame] | 1 | /* |
| 2 | * VIM_TEST_SETUP set filetype=progress |
| 3 | */ |
| 4 | |
| 5 | define variable customer_name as character no-undo. |
| 6 | |
| 7 | /* The test setup above is an example of a multi-line comment. |
| 8 | This is too; the leading * and left-hand alignment are not required. */ |
| 9 | for each customer no-lock |
| 10 | where customer.customer_id = 12345 |
| 11 | : |
| 12 | assign cust_name = customer.customer_name. /* Comments can also appear |
| 13 | at the end of a line. */ |
| 14 | end. /* for each customer */ |
| 15 | |
| 16 | /* Comments can be /* nested */. Here's the same query as above, but |
| 17 | commented out this time: |
| 18 | |
| 19 | for each customer no-lock |
| 20 | where customer.customer_id = 12345 |
| 21 | : |
| 22 | assign cust_name = customer.customer_name. /* Comments can also appear |
| 23 | at the end of a line. */ |
| 24 | end. /* for each customer */ |
| 25 | |
| 26 | TODO: Note that /*/ does not end the comment, because it actually starts a |
| 27 | new comment whose first character is a '/'. Now we need two end-comment |
| 28 | markers to return to actual code. */ */ |
| 29 | |
| 30 | display customer_name. |
| 31 | |
Daniel Smith | 4d68054 | 2024-07-25 20:55:34 +0200 | [diff] [blame] | 32 | // This is the single-line comment syntax. |
| 33 | |
| 34 | //No space is required after the slashes. Also, a /* here does not begin a |
| 35 | //new block comment. |
| 36 | |
| 37 | for each supplier no-lock: |
| 38 | /* However, a block comment can end inside (what looks like) a |
| 39 | single-line comment, because the slashes are just text as far as the |
| 40 | // block comment is concerned. */ |
| 41 | display supplier. |
| 42 | |
| 43 | // TODO: Observe that todo highlighting works in line comments too. |
| 44 | end. |
| 45 | |