mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-12-18 00:11:06 +00:00
28 lines
519 B
C++
28 lines
519 B
C++
|
entity self;
|
||
|
.float f;
|
||
|
..float fp;
|
||
|
...float fpp;
|
||
|
|
||
|
void try(entity e, ...float pp) {
|
||
|
print("and: ", ftos( e.(e.(e.pp)) ), "\n");
|
||
|
}
|
||
|
|
||
|
typedef float Float;
|
||
|
|
||
|
void try2(entity e, ...Float pp) {
|
||
|
print("and: ", ftos( e.(e.(e.pp)) ), "\n");
|
||
|
}
|
||
|
|
||
|
// whereas the varargs are tested in vararg tests
|
||
|
|
||
|
void main() {
|
||
|
self = spawn();
|
||
|
self.f = 123;
|
||
|
self.fp = f;
|
||
|
self.fpp = fp;
|
||
|
print(ftos( self.(self.fp) ), "\n");
|
||
|
print(ftos( self.(self.(self.fpp)) ), "\n");
|
||
|
try(self, fpp);
|
||
|
try2(self, fpp);
|
||
|
}
|