Jump to content

Canonicalize CIDR: Difference between revisions

m
→‎{{header|11l}}: `(-)` -> `~`
(Add Scala implementation)
m (→‎{{header|11l}}: `(-)` -> `~`)
Line 41:
| d < 0 | d > 255
R (0, 0)
V mask = (-)~((1 << (32 - m)) - 1)
V address = (a << 24) + (b << 16) + (c << 8) + d
address [&]= mask
Line 74:
184.232.176.184/18 -> 184.232.128.0/18
</pre>
 
=={{header|ALGOL 68}}==
<syntaxhighlight lang="algol68">BEGIN # show IPv4 addresses in CIDR notation in canonical form #
1,480

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.