This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Foo is | |
end Foo; | |
package Foo.Bar is | |
type Hurz is (Kol, Ra, Bi); | |
for Hurz use (Kol => 1, Ra => 2, Bi => 3); | |
end Foo.Bar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with Ada.Unchecked_Conversion; | |
with Interfaces.C; | |
with Ada.Text_IO; | |
procedure Foo is | |
type Bar is (Kol, Ra, Bi); | |
for Bar use (Kol => 1, Ra => 2, Bi => 3); | |
for Bar'Size use Interfaces.C.int'Size; | |
subtype Cocktail_Bar is Bar range Kol .. Ra; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile to make it work | |
it: | |
@echo > /dev/null | |
work: | |
@echo "aye!" | |
# support for Picard | |
so: | |
@echo "Warp 9 engaged." | |
.PHONY: it work so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import macros | |
macro callFilter(filter: stmt, value: stmt): expr = | |
if value.kind == nnkStrLit: | |
newStmtList( | |
newNimNode(nnkConstSection).add(newNimNode(nnkConstDef).add(newIdentNode("filtered"), newEmptyNode(), | |
newCall(filter, value))), | |
newIdentNode("filtered")) | |
else: | |
newCall(filter, value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
std::move_iterator move_it; | |
int I; | |
public: | |
Foo(const int like_to, const std::move_iterator& move_it) : | |
I(like_to), move_it(move_it) {} | |
}; |
NewerOlder