Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Oberon > Re: Of constant...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 21 of 28 Topic 442 of 500
Post > Topic >>

Re: Of constants and variables

by Ulrich <keine@[EMAIL PROTECTED] > Dec 7, 2007 at 12:23 AM

Andreas F. Borchert wrote:
> On 2007-12-02, Ulrich <keine@[EMAIL PROTECTED]
> wrote:
>=20
>>Wenn man in C eine Variable als Feld deklariert, wird sie auf dem
>>Stapel angelegt!
>=20
>=20
> No.

danke, da hatte ich mich geirrt - hab halt schon zu lang nicht mehr in C =
programmiert.
=20
>=20
>>char a[15] ergibt einen Zeiger auf einen zusammenh=E4ngenden Speicherbe=
reich.
>=20
>=20
> This defines a array of char with 15 elements, not a pointer.
> Yes, this is very same thing (i.e. same represenation in memory)
> as if you define
>=20
>    VAR a: ARRAY 15 OF CHAR;
>=20
> in Oberon. The only difference is that in C, =BBa=AB does not represent=

> the whole array but is interpreted as a constant pointer to the first
> element (with the exception of the sizeof operator).

der erste Punkt ist bereits erw=E4hnt worden, der zweite ist eine wichtig=
e Erg=E4nzung.
=20
>>Mehrdimensionale Felder unterscheiden sich in der Reihenfolge der
>>Speicherpl=E4tze, die man mit der Indizierung anspricht.
>=20
>=20
> There is no difference in Oberon and C for allocating multidimensional
> arrays, e.g.
>=20
>    double matrix[10][20];
>=20
> is represented the same way as
>=20
>    VAR matrix: ARRAY 10, 20 OF REAL;

der Speicherplatz ist gleich gro=DF, aber ich hab schon mehrmals gelesen,=
 dass die Anordnung nicht (zwangsl=E4ufig) =FCbereinstimmt.
ich wollte das gerade =FCberpr=FCfen, aber die Zeit ist mir davongelaufen=
=2E das Resultat kann ich erst sp=E4ter liefern.
=20
>>Prinzipiell unterscheidet sich in beiden Sprachen die Art und Weise,
>>wie damit gearbeitet wird, die Strukturen k=F6nnen nicht einfach aufein=
ander
>>abgebildet werden.
>=20
>=20
> There is no big difference in the structural representation of types
> (with the exception of type extensions which are not sup****ted by C).=20
> The type system is different, e.g. the C construct
>=20
>    char a[15];
>    char* ap;
>    ap =3D a;
>=20
> cannot be translated to
>=20
>    VAR a: ARRAY 15 OF CHAR; ap: POINTER TO CHAR;
>    (* ... *)
>    ap :=3D a;
>=20
> not just because Oberon does not sup****t =BBPOINTER TO CHAR=AB (just
> pointers to RECORD and ARRAY types are sup****ted) but also because
> a is not compatible to a pointer type.

?

POINTER TO ARRAY OF CHAR geht doch - ich verwende das t=E4glich.
 




 28 Posts in Topic:
Of constants and variables
"Xcriber51" <  2007-10-18 07:05:37 
Re: Of constants and variables
Stefano Ferrari <ferra  2007-10-18 07:36:44 
Re: Of constants and variables
"Xcriber51" <  2007-10-18 11:02:56 
Re: Of constants and variables
pjb@[EMAIL PROTECTED] (P  2008-06-13 20:55:42 
Re: Of constants and variables
Stefano Ferrari <ferra  2007-10-19 01:22:44 
Re: Of constants and variables
Stefano Ferrari <ferra  2007-10-19 01:34:25 
Re: Of constants and variables
"Xcriber51" <  2007-10-19 07:28:00 
Re: Of constants and variables
"Xcriber51" <  2007-10-22 05:41:51 
Re: Of constants and variables
"Chris Burrows"  2007-10-22 22:26:19 
Re: Of constants and variables
"Xcriber51" <  2007-10-22 12:20:08 
Re: Of constants and variables
"Chris Burrows"  2007-10-23 08:58:31 
Re: Of constants and variables
Stefano Ferrari <ferra  2007-10-19 06:09:17 
Re: Of constants and variables
"Chris Burrows"  2007-10-19 23:16:52 
Re: Of constants and variables
=?ISO-8859-1?Q?Christian_  2007-10-19 18:43:54 
Re: Of constants and variables
fmw@[EMAIL PROTECTED] (F  2007-10-19 16:06:35 
Re: Of constants and variables
=?ISO-8859-1?Q?Christian_  2007-10-19 18:33:11 
Re: Of constants and variables
August Karlstrom <fusi  2007-10-21 11:47:08 
Re: Of constants and variables
Ulrich <keine@[EMAIL P  2007-12-02 19:15:58 
Re: Of constants and variables
Ulrich <keine@[EMAIL P  2007-12-02 19:13:44 
Re: Of constants and variables
comp.lang.oberon@[EMAIL P  2007-12-02 23:01:11 
Re: Of constants and variables
Ulrich <keine@[EMAIL P  2007-12-07 00:23:22 
Re: Of constants and variables
comp.lang.oberon@[EMAIL P  2007-12-07 09:47:11 
Re: Of constants and variables
August Karlstrom <fusi  2007-10-21 11:58:00 
Re: Of constants and variables
Ulrich <keine@[EMAIL P  2007-12-02 19:29:01 
Re: Of constants and variables
Stefano Ferrari <ferra  2007-10-21 14:52:20 
Re: Of constants and variables
August Karlstrom <fusi  2007-10-22 17:57:46 
Re: Of constants and variables
Ulrich <keine@[EMAIL P  2007-12-02 19:23:15 
Re: Of constants and variables
fmw@[EMAIL PROTECTED] (F  2007-10-22 10:20:49 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 16:05:01 CDT 2008.