Re: Strings

new topic     » topic index » view thread      » older message » newer message

>in pascal strings are stored like this say you have the word PASCAL and it
>starts at memory location 13672 (this is an arbitrary no.)
>
>then the map of the memory would like
>
>13672  13673  13674  13675  13676  13677  13678
>  "P"       "A"       "S"       "C"       "A"       "L"       "\0"
>
>the "\0" at the end tells it that the string is over.


That the way C stores it!

Pascal is like:

13672   13673  13674  13675  13676  13677  13678
    6             P          A          S           C           A          L
  ^^^^
Length of string

Regards,
    Daniel   Berstein
    daber at pair.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu