Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site islenet.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!lll-crg!dual!islenet!jayf From: jayf@islenet.UUCP (Jay Fields) Newsgroups: net.lang.c,net.micro.mac Subject: Re: help with sizeof() in HIPPO-C Message-ID: <1599@islenet.UUCP> Date: Mon, 9-Sep-85 03:22:08 EDT Article-I.D.: islenet.1599 Posted: Mon Sep 9 03:22:08 1985 Date-Received: Thu, 12-Sep-85 10:09:24 EDT References: <1518@islenet.UUCP> Distribution: net Organization: Islenet Inc., Honolulu Lines: 40 Xref: watmath net.lang.c:6347 net.micro.mac:2612 > Just discovered that there does not seem to be a sizeof() function > in Hippo C level I or II. This would sure be useful for passing > the number of elements to an array sorting function like > sort(arrayname,sizeof(array[])/sizeof(array[element0])) > > Thanks in advance for any comments/ideas. > > j fields > ...!ihnp4!islenet!jayf Hippo C requires arrays of functions to be initialized thusly: struct test {int time,code;} bench[7] { {140,20}, {127,50}, {88,40}, {125,10}, {68,70}, {182,60}, {148,30} }; I understood that most compilers did not require the nesting of braces so long as the elements were declared in the correct order, and I did not realize (later on) that sizeof() was a compile time feature. More than one of us, in the class I was taking, made this mistake. Hippo~C, it turns out, also requires the seven (bench[7]). Other compilers will figure out that there's suppose to be a seven there and put one in on their own so to speak. Once the Hippo people got back from the computer show I found their support to be top notch. How many software companies do you know who's technical types will answer the phone at all hours of the night and early morning? Aloha, J Fields ....ihnp4!islenet!jayf