Skip to content

Commit 9c9192a

Browse files
authored
restore binary values for flags
1 parent 921e5f8 commit 9c9192a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/Language/create-cli.rakudoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ automatically to its corresponding C<enum> symbol:
325325

326326
=begin code
327327
enum Flag (
328-
FLAG_FOO => 40,
329-
FLAG_BAR => 41,
330-
FLAG_BAZ => 42,
328+
FLAG_FOO => 0b001,
329+
FLAG_BAR => 0b010,
330+
FLAG_BAZ => 0b100,
331331
);
332332

333333
sub MAIN(Flag $flag = FLAG_FOO) {
@@ -339,7 +339,7 @@ This will work correctly with
339339

340340
=for code :lang<text>
341341
raku MAIN-enum.raku FLAG_BAZ
342-
# OUTPUT: «Flagging FLAG_BAZ with value 42␤»
342+
# OUTPUT: «Flagging FLAG_BAZ with value 4␤»
343343

344344
but will die if called with something that is not a C<Flag>.
345345

0 commit comments

Comments
 (0)