eaolson Posted September 29, 2006 Report Share Posted September 29, 2006 It seems like both variants and flattened strings allow one to pass data in and out of a VI without needing to know what the underlying datatype is. Is there a reason to prefer one over the other in this instance (e.g. speed, memory size)? There are other applications, I'm sure: Variants have attributes (but I've never really seen the point of those); and TCP communication requires the use of strings. Variants carry with them information about the datatype, but you still need something of the appropriate datatype to use Variant to Data. Quote Link to comment
LAVA 1.0 Content Posted September 29, 2006 Report Share Posted September 29, 2006 Is there a reason to prefer one over the other in this instance (e.g. speed, memory size)? Variants are better for in-memory usage performance wise. Flattened strings suit better for storing data to disk etc. Variants are also more flexible in many ways. There was some discussion and examples of benefits of variants over typecasting in this thread. Quote Link to comment
crelf Posted September 29, 2006 Report Share Posted September 29, 2006 Variants have attributes (but I've never really seen the point of those) attributes are great - you can have as many as you like, as well as the attribute being a variant itself, which means that you can attach any sort of metadata to a variant. This opens a bunch of opportunities including building architectures around dynamic data streams - they're awesome! (...and fast too ) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.