Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site kuling.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!genrad!panda!talcott!harvard!seismo!mcvax!enea!kuling!gostas From: gostas@kuling.UUCP (G|sta Simil{/ml) Newsgroups: net.lang.c Subject: c types problem Message-ID: <870@kuling.UUCP> Date: Thu, 2-Jan-86 23:29:13 EST Article-I.D.: kuling.870 Posted: Thu Jan 2 23:29:13 1986 Date-Received: Mon, 6-Jan-86 03:16:22 EST Reply-To: gostas@kuling.UUCP (G|sta Simil{/ml) Organization: The Royal Inst. of Techn., Stockholm Lines: 11 I need to define a type for a program which can store any of the types long, int, short and also the unsigned variants of them. Some of the routines referencing this types will not use them directly however, it will use the sys/types.h typedefs dev_t, time_t etc. It will look something like this: "(*func)(&data)" there *func, but not the calling routine knows what type is currently stored in "data". The formal (but ugly) way to solve this would proparbly be to use a union for all (about 10) types. But now I wonder if anyone have a simpler but resonably portable solution? G|sta Simil{ gostas@kuling.UUCP