TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: Bob van der Poel 76510,2203 (X)
from: Pete Lyall 76703,4230
date: 1992-11-22 13:47:03
subject: #17143-C Casts

#: 17145 S12/OS9/68000 (OSK)
    22-Nov-92  13:47:03
Sb: #17143-C Casts
Fm: Pete Lyall 76703,4230
To: Bob van der Poel 76510,2203 (X)

Bob -

Short of going into assembler (see below), I don't know of a compile time
method. As you surmise, the sizeof will get you the size of the pointer.

Assembly style would be something like this:

string fcc "Holy cow"
       fcb $0d strlen set .-string

You could probably bracket them with #asm and #endasm and include it in your C
program.

You could get an idea by using the CC options to go to assembler with source
embedded as comments. Then, edit the assembly source to include the 'len set
.-string_start' stuff.

Pete

P.S. Make the '.'s '*''s

SOURCE: compuserve via textfiles.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™.