#What's c++
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
22-Jun-88 02:03:32
John,
If I knew French better, I wouldn't think it sounded like random noises
made through the nose. 🙂
It's true… I admit it, but consider all the ways of representing
something in memory. A string ("this is a string") looks like that in C. In
most cases I have examined it's really not a string, but a pointer to that
string. Can I assume that it will always be a pointer to a string? In a
structure that has a member declared as 'APTR Text;', can I use a string
directly in the defintion of the structure or is it only a pointer when used
as part of a function call?
In assembler it's clear… 'label dc.b 'this is a string',0 is a series of
bytes defined at the address 'label'. the zero terminator (optional unless a
system or external routine nees it). It is a string if I use it as a string.
It's a bit field if I choose to look at it that way, or an array of 4
longwords with a sngle 0 at the end if I want it to be.Nothing is hidden, not
even the (possibly required) null terminator.
Again we come back to the 'in betweenness' of C. In a high level language,
it tends to not matter how the string is passed or referenced. It becomes an
object that can be manipulated in certain well defined and possibly
restricted ways.
And of course if you can easily figure out what **foo[*i,**j] is, then you
are hopelessly bent, and we aren't even on the same planet. 🙂
-larry