Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!bc From: bc@Apple.COM (bill coderre) Newsgroups: comp.sys.mac.hypercard Subject: Re: Reading files containing X'00 (growl) Message-ID: <43366@apple.Apple.COM> Date: 26 Jul 90 23:03:58 GMT References: <1990Jul17.121924.25050@watserv1.waterloo.edu> <1064.26a73cfd@waikato.ac.nz> <43234@apple.Apple.COM> <1093.26adca68@waikato.ac.nz> Organization: Apple Computer Inc, Cupertino, CA Lines: 43 Me: |"Would you rather they used P-strings, which could theoretically |contain 00's (except that certain Toolbox routines (such as all the |Text Edit rouitines) would barf), but which restrict text to 255 |characters?" Lawrence D'Oliveiro: |No, I wouldn't. HyperCard strings are stored as relocatable blocks, |aren't they? Well, what's wrong with GetHandleSize for getting the length |of the string? Granted it can be slow changing the size of the block |all the time, so for compute-intensive operations inside HyperCard |you'd just maintain a separate temporary longword count for each string, |and then do a final SetHandleSize on each string at the end. Actually, I don't know a damn thing about the internals of HC, so your theory might or might not be correct. If it isn't (which, when I think of it, is likely), you would add a BIG overhead to normal manipulation. But let's just compromise, shall we: Feature Request: Data blocks similar to strings that can contain NUL (hex 00) characters. Alternately, extend normal strings to handle NULs. Rationale: Use of binary data. Currently, HC does not allow NUL characters in strings. When using Read From File, HC converts NULs to spaces. This is unacceptable for binary data manipulation. ........ I will file this feature request today. If you have a feature you'd like to see, PLEASE WAIT to see if HC 2.0 adds almost the same feature. Chances are, it does! If it doesn't, I'll figure out a way to request it. Note please that I have exactly the same sway you do with the HC team: none. They listen to requests, but they make NO promises. Got it? mr HEINOUS "just a contractor, not a spokesdroid"