Changeset 421a287 for doc/user


Ignore:
Timestamp:
Jun 2, 2017, 4:59:26 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
a4683611
Parents:
83e9bd3
Message:

update allocation documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/user/user.tex

    r83e9bd3 r421a287  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Thu Jun  1 22:46:09 2017
    14 %% Update Count     : 2126
     13%% Last Modified On : Fri Jun  2 10:07:51 2017
     14%% Update Count     : 2128
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    185185While the \CFA I/O looks similar to the \Index*[C++]{\CC{}} output style, there are important differences, such as automatic spacing between variables as in \Index*{Python} (see~\VRef{s:IOLibrary}).
    186186
    187 This document is a user manual for the \CFA programming language, targeted at \CFA programmers.
     187This document is a programmer reference-manual for the \CFA programming language.
     188The manual covers the core features of the language and runtime-system, with simple examples illustrating syntax and semantics of each feature.
     189The manual does not teach programming, i.e., how to combine the new constructs to build complex programs.
     190A reader should already have an intermediate knowledge of control flow, data structures, and concurrency issues to understand the ideas presented as well as some experience programming in C/\CC.
    188191Implementers may refer to the \CFA Programming Language Specification for details about the language syntax and semantics.
    189 In its current state, this document covers the intended core features of the language.
    190192Changes to the syntax and additional features are expected to be included in later revisions.
    191193
     
    52735275\begin{cfa}[aboveskip=0pt,belowskip=0pt]
    52745276// C unsafe allocation
    5275 extern "C" { void * mallac( size_t size ); }§\indexc{memset}§
    5276 extern "C" { void * calloc( size_t dim, size_t size ); }§\indexc{calloc}§
    5277 extern "C" { void * realloc( void * ptr, size_t size ); }§\indexc{realloc}§
    5278 extern "C" { void * memalign( size_t align, size_t size ); }§\indexc{memalign}§
    5279 extern "C" { int posix_memalign( void ** ptr, size_t align, size_t size ); }§\indexc{posix_memalign}§
     5277extern "C" {
     5278void * mallac( size_t size );§\indexc{memset}§
     5279void * calloc( size_t dim, size_t size );§\indexc{calloc}§
     5280void * realloc( void * ptr, size_t size );§\indexc{realloc}§
     5281void * memalign( size_t align, size_t size );§\indexc{memalign}§
     5282int posix_memalign( void ** ptr, size_t align, size_t size );§\indexc{posix_memalign}§
     5283}
    52805284
    52815285// §\CFA§ safe equivalents, i.e., implicit size specification
     
    53025306
    53035307// C unsafe initialization/copy
    5304 extern "C" { void * memset( void * dest, int c, size_t size ); }
    5305 extern "C" { void * memcpy( void * dest, const void * src, size_t size ); }
     5308extern "C" {
     5309void * memset( void * dest, int c, size_t size );
     5310void * memcpy( void * dest, const void * src, size_t size );
     5311}
    53065312
    53075313// §\CFA§ safe initialization/copy
Note: See TracChangeset for help on using the changeset viewer.