Changeset 4040425 for src/examples/array.c
- Timestamp:
- Mar 2, 2016, 6:15:02 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:
- 36ebd03, b63e376
- Parents:
- 8f610e85
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/examples/array.c
r8f610e85 r4040425 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Ma y 27 18:10:13 201513 // Update Count : 212 // Last Modified On : Wed Mar 2 18:13:52 2016 13 // Update Count : 3 14 14 // 15 15 16 16 #include "array.h" 17 17 18 /// forall( type array_type, elt_type | bounded_array( array_type, elt_type ) )18 /// forall( otype array_type, elt_type | bounded_array( array_type, elt_type ) ) 19 19 /// [ array_iterator begin, array_iterator end ] 20 20 /// get_iterators( array_type array ) … … 25 25 26 26 // The first element is always at index 0. 27 forall( type array_type,type elt_type | bounded_array( array_type, elt_type ) )27 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) ) 28 28 elt_type * begin( array_type array ) { 29 29 return &array[ 0 ]; … … 31 31 32 32 // The end iterator should point one past the last element. 33 forall( type array_type,type elt_type | bounded_array( array_type, elt_type ) )33 forall( otype array_type, otype elt_type | bounded_array( array_type, elt_type ) ) 34 34 elt_type * end( array_type array ) { 35 35 return &array[ last( array ) ] + 1;
Note: See TracChangeset
for help on using the changeset viewer.