Sorry, I wasn't clear in my last message about this... the decimal type itself is not new, but the decimal type is new for .NET 2.0's Floor function.
73 de Phil N8VB
Phil,
I have made the changes to the source for Preview 5. It is interesting that this cast is required though. The decimal type is present in v1.1, but I guess the rules about automatic casting have changed. It looks like in v2.0 when you use 2 doubles, it possibly upcasts to a decimal. In v1.1, it would just use a double.
Eric Wachsmann
FlexRadio Systems
-----Original Message-----
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On Behalf Of Philip Covington
Sent: Thursday, November 10, 2005 11:22 AM
To: Sami Aintila
Cc: FlexRadio Reflector
Subject: Re: [Flexradio] update to .net
A really simple change is all that is required.
To compile PowerSDR console with either .NET 1.1 or .NET 2.0 this simple change would have to be made to:
Lines:
1214712221
1230112435
12510
12591
12710
12753
12802
the change is:
original code: ...(int)Math.Floor((spectrum_grid_max -num)...
.NET 1.1 and .NET 2.0 code: ...(int)Math.Floor((double)(spectrum_grid_max -num)...
Note the cast to double to unconfuse the compiler about whether Math.Floor is dealing with a double type or a decimal (new in .NET 2.0) type.
By making this change to the current source code, PowerSDR console with compile with both VS 2003/.NET1.1 or VS 2005/.NET2.0 (and Express).
Phil N8VB
--
Philip A Covington
http://www.philcovington.com