Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package metaobjectTest
- @doc{*
- This is a literal number annotation, an identifier follows a literal
- number. The syntax for this annotation is
- nbin or nBin or nBIN
- in which 'n' is a literal number in base 2. 'n' can have numbers and
- underscores but it should start with a number (otherwise the
- compiler will consider it as an identifier). The metaobject uses method
- Integer.valueOf(n, 2)
- to parse the number 'n' in base 2.
- *}
- object Number_bin
- func run {
- assert 101bin == 5;
- assert 10BIN == 2;
- assert 111_111Bin == 63;
- }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement