March 31, 2004
Matthew wrote:

>>>Just use the strings as unique identifiers. The biggest pain
>>>about using Java's System.getProperty("java.vendor") is that
>>>the strings have to include the version information in the string
>>>so it changes from release to release. Since std.compiler has
>>>version numbers as ints the string can remain constant from release
>>>to release.
>>>      
>>>
>>Having the version number separate is a good idea <g>.
>>    
>>
>
>Why not have two strings - vendorName and vendorVersion. The former is
>free-form, but fixed from first use for a vendor, and the second has the
>fixed for "J.N.R"  for maJor, miNor and Revision.
>
>  
>
Why does vendorVersion have to be a string? Can't it be a number or a struct of 4 (3) bytes? ie

struct
{
byte J;
byte N;
byte R;
byte O; //Other
}

Its easy to convert numbers to strings but not the other way round.

-- 
-Anderson: http://badmama.com.au/~anderson/
March 31, 2004
J Anderson wrote:

> Matthew wrote:
>
>>>> Just use the strings as unique identifiers. The biggest pain
>>>> about using Java's System.getProperty("java.vendor") is that
>>>> the strings have to include the version information in the string
>>>> so it changes from release to release. Since std.compiler has
>>>> version numbers as ints the string can remain constant from release
>>>> to release.
>>>>     
>>>
>>> Having the version number separate is a good idea <g>.
>>>   
>>
>>
>> Why not have two strings - vendorName and vendorVersion. The former is
>> free-form, but fixed from first use for a vendor, and the second has the
>> fixed for "J.N.R"  for maJor, miNor and Revision.
>>
>>  
>>
> Why does vendorVersion have to be a string? Can't it be a number or a struct of 4 (3) bytes? ie
>
> struct
> {
> byte J;
> byte N;
> byte R;
> byte O; //Other
> }
>
> Its easy to convert numbers to strings but not the other way round.
>
Actually you could probably have:

struct versionNumber
{
byte J;
byte N;
byte R;
byte O; //Other such as different flavours
char [] toString {...} //Converts to dot format

-- 
-Anderson: http://badmama.com.au/~anderson/
1 2 3
Next ›   Last »