Skip to content

Commit 4c703bb

Browse files
authored
add references to Q syntax
1 parent 0eedb0e commit 4c703bb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/Language/create-cli.rakudoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,11 @@ If no multi candidate of C<MAIN> is found for the given command line
500500
parameters, the sub C<USAGE> is called. If no such method is found,
501501
the compiler will output a default usage message.
502502

503+
In the following example, we print a custom usage message via
504+
a L<Q string|/language/quoting>
505+
(with the C<:c|/language/quoting#Heredocs:_:to> flag enabling interpolation of curly braces,
506+
and the C<:to|/language/quoting#Heredocs:_:to> flag for stating it all as a heredoc):
507+
503508
#|(is it the answer)
504509
multi MAIN(Int $i) { say $i == 42 ?? 'answer' !! 'dunno' }
505510
#|(divide two numbers)

0 commit comments

Comments
 (0)