Changeset 3848e0e for translator/examples
- Timestamp:
- Dec 3, 2014, 3:08:38 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- d9a0e76
- Parents:
- 42dcae7
- Location:
- translator/examples
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/examples/min.c
r42dcae7 r3848e0e 4 4 5 5 forall( type T | { int ?<?( T, T ); } ) 6 T min( T t1,T t2 ) {6 T min( const T t1, const T t2 ) { 7 7 return t1 < t2 ? t1 : t2; 8 8 } 9 9 10 10 int main() { 11 //char c;12 //c = min( 'a', 'z' );13 //printf( "minimum %d\n", c );11 char c; 12 c = min( 'a', 'z' ); 13 printf( "minimum %d\n", c ); 14 14 int i; 15 15 i = min( 4, 3 );
Note: See TracChangeset
for help on using the changeset viewer.