From owner-freebsd-questions@FreeBSD.ORG Thu Feb 3 11:24:29 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AFA816A4CE for ; Thu, 3 Feb 2005 11:24:29 +0000 (GMT) Received: from cromagnon.cullmail.com (cromagnon.cullmail.com [67.33.58.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC92D43D1F for ; Thu, 3 Feb 2005 11:24:28 +0000 (GMT) (envelope-from jamoore@cromagnon.cullmail.com) Received: from cromagnon.cullmail.com (localhost.cullmail.com [127.0.0.1]) j13BLgxY023214; Thu, 3 Feb 2005 05:21:42 -0600 (CST) (envelope-from jamoore@cromagnon.cullmail.com) Received: from localhost (localhost [[UNIX: localhost]]) by cromagnon.cullmail.com (8.12.10/8.12.10/Submit) id j13BLfUZ023213; Thu, 3 Feb 2005 05:21:41 -0600 (CST) (envelope-from jamoore) From: Jay Moore To: freebsd-questions@freebsd.org Date: Thu, 3 Feb 2005 05:21:41 -0600 User-Agent: KMail/1.6.1 References: <20050201164337.GA78979@dogma.freebsd-uk.eu.org> In-Reply-To: <20050201164337.GA78979@dogma.freebsd-uk.eu.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200502030521.41528.jaymo@cromagnon.cullmail.com> cc: Jonathon McKitrick Subject: Re: Unix equivalent of a variant?? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jaymo@cromagnon.cullmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2005 11:24:29 -0000 On Tuesday 01 February 2005 10:43 am, Jonathon McKitrick wrote: > Hey everyone, > > I'm finally doing something very exciting here at work: porting software to > Unix! > > I need the equivalent of a variant, however. A hold-everything variable > that can be any type in C/C++. Is there something already out there I can > use or should I just roll my own? I think you should read and understand MS' documentation on the variant data type before you spend much time trying to code this for *nix. IIRC, the Variant data type is limited to development environments like "Visual Basic". I'm thinking there must be an awful lot of overhead associated with handling a "Variant" data type, as every use of it must figure out what the "real" datat type is. I don't know what your objective is, and certainly don't pretend to tell you this shouldn't be done, but - just because MS has done it, does not mean it is a good thing to do in general. Jay