TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Edwards
from: Frank Adam
date: 1996-06-18 07:29:00
subject: Ptrs

G'Day Paul,
 
-=> Quoting Paul Edwards to Frank Adam <=-

 FA> The pointers can be changed ++p p=p1, contents can't, *p='l' .
 PE> Thanks.  I dimly recall someone saying something about
 PE> const char * const x;
                                                   
 PE> I don't know if the last 2 are legal (the dim recollection says
They do compile, but must admit i've never seen the last one. 
I just did an interesting test on it, but just had to see what it does.
Well, it locks both the data and the pointer, i know how to get around 
changing the data, but having tried just about all possible and 
impossible combinations of casts, i can not get a const pointer to move.
                
 PE> they are), but in future, I'll try to remember the common bit under
 PE> the rule "const applies to the closest thing!".  BFN.  Paul.
char* const          x;   ;-)
 
  L8r Frank (fadam{at}ozemail.com.au).
  
___ Blue Wave/DOS v2.21

--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)
SEEN-BY: 50/99 620/243 623/630 632/349 635/503 544 727 711/401 409 410 413
SEEN-BY: 711/430 808 809 932 934 712/515 713/888 714/906 800/1
@PATH: 635/544 50/99 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.