| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | string constants |
ac> Hi there. Why does emx/gcc disallow the modification of ac> string constants? Or more to the point - why does ANSI/ISO ac> C disallow this? Tnx. The reason for this is that if you have declared a string constant, the ¨compiler is permitted to place the constant in read-only data segments. In the case of PC's this may be the code segment. In the case of mainframes it alsmost certainly will be in the code segment. For those mainframe that support code and data separation, such as Tandems, code is by definition, read-only and an execution (rather than the preferable compile-time) error will occur. Allowinf the compiler to put things into the code, rather than ¨the data segment, has implications for datasegment usage, and is absoulutely ¨vital if you are trying to write Rom-able code. John ... Error 87 - Tagline out of caracters... ---* Origin: Eagles.bbs.net.au - 12 Lines to Surf the Net - (3:712/704) SEEN-BY: 50/99 620/243 623/630 711/401 409 410 430 510 807 808 809 932 934 SEEN-BY: 712/218 401 404 407 505 506 515 517 619 623 704 816 848 713/888 SEEN-BY: 714/906 800/1 7877/2809 @PATH: 712/704 515 711/808 809 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™.