Liste des Groupes | Revenir à cl c |
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:<Algol 68 code elided>On 14.04.2024 02:29, Michael S wrote:>[...]It looks closer to C than to Pascal, i.e. pointer can point to any>
object rather than just to dynamically allocated object.
The major difference is that they are closely bound to the type.
In that respect they are more like Pascal pointers. C pointers
open the can of issues with arithmetic on pointer values. You
don't find that in Pascal or Algol 68.
>
How are C pointers not "closely bound to the type"?
int i = 42;
memcpy(&i, &(float){3.14}, sizeof i);
printf("%d\n", i);
>
That looks like a pretty loose association between pointer and object
type to me. This is not an accident or an unintended loophole. It's by
design.
>
Certainly every pointer value in C has an associated type, but the
intention is that this association can be changed by pointer type
conversion as needed.
>
You often /have/ to make us of this. For example, when calling qsort,
you will usually change the association between the pointer and the
pointed-to type (void) in order to do the comparison. And C does not
even insist that you change it back to the original pointed-to type as
you can legally write a comparison function for, say, float data that
uses the representation as "raw" bytes.
Date | Sujet | # | Auteur | |
7 Apr 24 | Recursion, Yo | 102 | Lawrence D'Oliveiro | |
7 Apr 24 | Re: Recursion, Yo | 100 | fir | |
9 Apr 24 | Re: Recursion, Yo | 99 | Janis Papanagnou | |
9 Apr 24 | Re: Recursion, Yo | 7 | Lawrence D'Oliveiro | |
9 Apr 24 | Re: Recursion, Yo | 5 | Janis Papanagnou | |
9 Apr 24 | Re: Recursion, Yo | 4 | Ben Bacarisse | |
9 Apr 24 | Re: Recursion, Yo | 3 | Janis Papanagnou | |
9 Apr 24 | Re: Recursion, Yo | 2 | Keith Thompson | |
10 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
9 Apr 24 | Re: Recursion, Yo | 1 | bart | |
9 Apr 24 | Re: Recursion, Yo | 91 | Ben Bacarisse | |
9 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
10 Apr 24 | Re: Recursion, Yo | 89 | Lawrence D'Oliveiro | |
10 Apr 24 | Re: Recursion, Yo | 1 | Chris M. Thomasson | |
10 Apr 24 | Re: Recursion, Yo | 86 | David Brown | |
10 Apr 24 | Re: Recursion, Yo | 84 | Lawrence D'Oliveiro | |
10 Apr 24 | Re: Recursion, Yo | 83 | David Brown | |
10 Apr 24 | Re: Recursion, Yo | 73 | bart | |
10 Apr 24 | Re: Recursion, Yo | 71 | David Brown | |
11 Apr 24 | Re: Recursion, Yo | 70 | Lawrence D'Oliveiro | |
11 Apr 24 | Re: Recursion, Yo | 4 | Kaz Kylheku | |
11 Apr 24 | Heh heh... (Was: Recursion, Yo) | 3 | Kenny McCormack | |
11 Apr 24 | Re: Heh heh... (Was: Recursion, Yo) | 2 | Kaz Kylheku | |
11 Apr 24 | Re: Heh heh... (Was: Recursion, Yo) | 1 | Kenny McCormack | |
11 Apr 24 | Re: Recursion, Yo | 65 | David Brown | |
11 Apr 24 | Re: Recursion, Yo | 62 | Kaz Kylheku | |
11 Apr 24 | Re: Recursion, Yo | 1 | David Brown | |
12 Apr 24 | Re: Recursion, Yo | 60 | Lawrence D'Oliveiro | |
12 Apr 24 | Re: Recursion, Yo | 2 | Kaz Kylheku | |
12 Apr 24 | Re: Recursion, Yo | 1 | Dan Cross | |
12 Apr 24 | Re: Recursion, Yo | 57 | Janis Papanagnou | |
12 Apr 24 | Re: Recursion, Yo | 6 | David Brown | |
12 Apr 24 | Re: Recursion, Yo | 5 | Janis Papanagnou | |
12 Apr 24 | Re: Recursion, Yo | 3 | David Brown | |
13 Apr 24 | Re: Recursion, Yo | 2 | Janis Papanagnou | |
13 Apr 24 | Re: Recursion, Yo | 1 | David Brown | |
13 Apr 24 | Re: Recursion, Yo | 1 | Lawrence D'Oliveiro | |
12 Apr 24 | Re: Recursion, Yo | 45 | Lawrence D'Oliveiro | |
12 Apr 24 | Re: Recursion, Yo | 44 | Janis Papanagnou | |
12 Apr 24 | Re: Recursion, Yo | 1 | bart | |
13 Apr 24 | Re: Recursion, Yo | 42 | Lawrence D'Oliveiro | |
13 Apr 24 | Re: Recursion, Yo | 14 | Michael S | |
14 Apr 24 | Re: Recursion, Yo | 11 | Ben Bacarisse | |
14 Apr 24 | Re: Recursion, Yo | 10 | Michael S | |
15 Apr 24 | Re: Recursion, Yo | 9 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 8 | Keith Thompson | |
15 Apr 24 | Re: Recursion, Yo | 7 | Ben Bacarisse | |
15 Apr 24 | Re: Recursion, Yo | 6 | Keith Thompson | |
15 Apr 24 | Re: Recursion, Yo | 2 | bart | |
15 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
15 Apr 24 | Re: Recursion, Yo | 3 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
14 Apr 24 | Re: Recursion, Yo | 2 | Lawrence D'Oliveiro | |
14 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
13 Apr 24 | Re: Recursion, Yo | 27 | Janis Papanagnou | |
14 Apr 24 | Re: Recursion, Yo | 26 | Lawrence D'Oliveiro | |
14 Apr 24 | Re: Recursion, Yo | 25 | Ben Bacarisse | |
14 Apr 24 | Re: Recursion, Yo | 2 | bart | |
14 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
15 Apr 24 | Re: Recursion, Yo | 22 | Lawrence D'Oliveiro | |
15 Apr 24 | Re: Recursion, Yo | 20 | Chris M. Thomasson | |
15 Apr 24 | Re: Recursion, Yo | 5 | Ben Bacarisse | |
16 Apr 24 | Re: Recursion, Yo | 4 | Lawrence D'Oliveiro | |
17 Apr 24 | Re: Recursion, Yo | 3 | Ben Bacarisse | |
18 Apr 24 | Re: Recursion, Yo | 2 | Lawrence D'Oliveiro | |
22 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 14 | Janis Papanagnou | |
16 Apr 24 | Re: Recursion, Yo | 2 | Lawrence D'Oliveiro | |
22 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
16 Apr 24 | Re: Recursion, Yo | 11 | Michael S | |
19 Apr 24 | Re: Recursion, Yo | 9 | Tim Rentsch | |
19 Apr 24 | Re: Recursion, Yo | 4 | bart | |
20 Apr 24 | Re: Recursion, Yo | 3 | Ben Bacarisse | |
20 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
20 Apr 24 | Re: Recursion, Yo | 1 | Kaz Kylheku | |
19 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
19 Apr 24 | Re: Recursion, Yo | 2 | Keith Thompson | |
20 Apr 24 | Re: Recursion, Yo | 1 | Tim Rentsch | |
20 Apr 24 | Re: Recursion, Yo | 1 | Tim Rentsch | |
22 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
15 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
12 Apr 24 | Re: Recursion, Yo | 4 | bart | |
12 Apr 24 | Re: Recursion, Yo | 2 | Janis Papanagnou | |
12 Apr 24 | Re: Recursion, Yo | 1 | bart | |
13 Apr 24 | Re: Recursion, Yo | 1 | Keith Thompson | |
13 Apr 24 | Re: Recursion, Yo | 1 | Tim Rentsch | |
11 Apr 24 | Re: Recursion, Yo | 2 | Keith Thompson | |
12 Apr 24 | Re: Recursion, Yo | 1 | David Brown | |
14 Apr 24 | Re: Recursion, Yo | 1 | fir | |
10 Apr 24 | Re: Recursion, Yo | 1 | Janis Papanagnou | |
10 Apr 24 | Re: Recursion, Yo | 2 | Kaz Kylheku | |
10 Apr 24 | Re: Recursion, Yo | 1 | David Brown | |
11 Apr 24 | Re: Recursion, Yo | 2 | Lawrence D'Oliveiro | |
12 Apr 24 | Re: Recursion, Yo | 1 | Ben Bacarisse | |
11 Apr 24 | Re: Recursion, Yo | 4 | Lawrence D'Oliveiro | |
11 Apr 24 | Re: Recursion, Yo | 1 | Kaz Kylheku | |
11 Apr 24 | Re: Recursion, Yo | 2 | David Brown | |
11 Apr 24 | Re: Recursion, Yo | 1 | Lawrence D'Oliveiro | |
10 Apr 24 | Re: Recursion, Yo | 1 | Kaz Kylheku | |
10 Apr 24 | Re: Recursion, Yo | 1 | Tim Rentsch | |
9 Apr 24 | Re: Recursion, Yo | 1 | Lawrence D'Oliveiro |
Les messages affichés proviennent d'usenet.