Changeset f277ab6c


Ignore:
Timestamp:
Dec 12, 2023, 2:35:39 PM (5 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
c40157e
Parents:
7972603
Message:

comment back in lstinputlisting files after missing files pushed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/mike_brooks_MMath/background.tex

    r7972603 rf277ab6c  
    4040
    4141TODO: typeset
    42 %\lstinputlisting[language=C, firstline=13, lastline=56]{bkgd-c-tyerr.c}
     42\lstinputlisting[language=C, firstline=13, lastline=56]{bkgd-c-tyerr.c}
    4343
    4444
     
    4848
    4949TODO: typeset
    50 %\lstinputlisting[language=C, firstline=35, lastline=116]{bkgd-carray-arrty.c}
     50\lstinputlisting[language=C, firstline=35, lastline=116]{bkgd-carray-arrty.c}
    5151
    5252My contribution is enabled by recognizing
     
    176176
    177177TODO: typeset
    178 %\lstinputlisting[language=C, firstline=4, lastline=26]{bkgd-carray-decay.c}
     178\lstinputlisting[language=C, firstline=4, lastline=26]{bkgd-carray-decay.c}
    179179
    180180
     
    229229the parameter's type becomes a type that I summarize as being the array-decayed type.
    230230The respective handlings of the following two parameter spellings shows that the array-spelled one is really, like the other, a pointer.
    231 %\lstinputlisting[language=C, firstline=40, lastline=44]{bkgd-carray-decay.c}
     231\lstinputlisting[language=C, firstline=40, lastline=44]{bkgd-carray-decay.c}
    232232As the @sizeof(x)@ meaning changed, compared with when run on a similarly-spelled local variariable declaration,
    233233GCC also gives this code the warning: ```sizeof' on array function parameter `x' will return size of `float *'.''
    234234
    235235The caller of such a function is left with the reality that a pointer parameter is a pointer, no matter how it's spelled:
    236 %\lstinputlisting[language=C, firstline=60, lastline=63]{bkgd-carray-decay.c}
     236\lstinputlisting[language=C, firstline=60, lastline=63]{bkgd-carray-decay.c}
    237237This fragment gives no warnings.
    238238
     
    240240Note the opposite meaning of this spelling now, compared with its use in local variable declarations.
    241241This point of confusion is illustrated in:
    242 %\lstinputlisting[language=C, firstline=80, lastline=87]{bkgd-carray-decay.c}
     242\lstinputlisting[language=C, firstline=80, lastline=87]{bkgd-carray-decay.c}
    243243The basic two meanings, with a syntactic difference helping to distinguish,
    244244are illustrated in the declarations of @ca@ vs.\ @cp@,
     
    259259Pointer decay does not affect pointer-to-array types, because these are already pointers, not arrays.
    260260As a result, a function with a pointer-to-array parameter sees the parameter exactly as the caller does:
    261 %\lstinputlisting[language=C, firstline=100, lastline=110]{bkgd-carray-decay.c}
     261\lstinputlisting[language=C, firstline=100, lastline=110]{bkgd-carray-decay.c}
    262262
    263263
Note: See TracChangeset for help on using the changeset viewer.