www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/02/00:00:23

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What happened to sizeof()?
Date: Sat, 01 Aug 1998 20:34:50 -0700
Organization: Alcyone Systems
Lines: 23
Message-ID: <35C3DE5A.65D38227@alcyone.com>
References: <6prao1$kas AT freenet-news DOT carleton DOT ca> <EwyJ6q DOT nvM AT fcshome DOT stoneham DOT ma DOT us>
NNTP-Posting-Host: stefany.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Fred Smith wrote:

> It's not a function (though it DOES look like one), it's a
> compile-time
> service.

It doesn't have to look like one.  You only need to use parentheses when
the argument is a type, rather than a variable.

    int i;

    printf("sizeof i = %d\n", sizeof i);       /* the size of i */
    printf("sizeof(int) = %d\n", sizeof(int)); /* the size of an int */


-- 
Erik Max Francis / email max AT alcyone DOT com / whois mf303 / icq 16063900 
Alcyone Systems / irc maxxon (efnet) / finger max AT sade DOT alcyone DOT com
  San Jose, CA / languages En, Eo / web http://www.alcyone.com/max/
          USA / icbm 37 20 07 N 121 53 38 W
             \
            / I've got the fever for the flavor of a cracker
           / Ice Cube

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019