TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Rowan_Crowe
from: andrew clarke
date: 1996-10-05 14:14:56
subject: Auto string-length determination

04 Oct 96 11:20, Rowan_Crowe wrote to andrew clarke:

 > Yup. I stand corrected (can we agree on 'clarified'? :) )

:-)

 ac>>   size_t Max_Length = sizeof(String) - 1;

 ac>> (In other words, the size of the entire array minus one byte for the
 ac>> null terminator.)

 > But will this still work if the array is not in scope?

Nope.

 > What if it's passed to a function as a pointer?

I hope you've had your Weetbix.

--- Msged/2 4.00
* Origin: Blizzard of Ozz, Melbourne, Australia (3:635/727.4{at}fidonet)
SEEN-BY: 50/99 620/243 623/630 632/349 635/503 544 727 728 711/409 410 413
SEEN-BY: 711/430 808 809 932 934 712/515 713/888 714/906 800/1
@PATH: 635/727 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™.