Re: [fpc-devel] How are short/ansi strings implemented ?

2011-04-18 Thread Michael Schnell

On 04/16/2011 02:06 PM, Skybuck Flying wrote:


2. I can also imagine a situation where the compiler would first be 
string-less


Of course, as ANSI C does not have strings. But this is not handy at all.

-Michael
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Extended type

2011-04-18 Thread Daniël Mantione



Op Mon, 18 Apr 2011, schreef Hans-Peter Diettrich:


Sven Barth schrieb:

On Windows 64-bit you must not use the x87 FPU, because Microsoft wants it 
so.


Can you be a bit more concrete?


Originally MS spread info it wouldn't work at all under Windows, but that 
proved to be false, the FPU works technically. Now MS just states it is 
unsupported.


Daniël___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Extended type

2011-04-18 Thread Jonas Maebe


On 18 Apr 2011, at 10:13, Daniël Mantione wrote:

Originally MS spread info it wouldn't work at all under Windows, but  
that proved to be false,

the FPU works technically. Now MS just states it is unsupported.


And deprecated: 
http://msdn.microsoft.com/en-us/library/ee418798(VS.85).aspx#Porting_to_64bit

The x87, MMX, and 3DNow! instruction sets are deprecated in 64-bit  
modes. The instructions sets are still present for backward  
compatibility for 32-bit mode; however, to avoid compatibility issues  
in the future, their use in current and future projects is discouraged.



Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Extended type

2011-04-18 Thread Hans-Peter Diettrich

Jonas Maebe schrieb:


On 18 Apr 2011, at 10:13, Daniël Mantione wrote:

Originally MS spread info it wouldn't work at all under Windows, but 
that proved to be false,

the FPU works technically. Now MS just states it is unsupported.


And deprecated: 
http://msdn.microsoft.com/en-us/library/ee418798(VS.85).aspx#Porting_to_64bit


Thanks. I always knew that Windows is not an OS for serious work, but I 
never heard that from Microsoft so clearly :-(


DoDi

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] GetEnumValue result type

2011-04-18 Thread Leonardo M . Ramé
Hi, I'm having some trouble if I want to pass an enumerated type as a function 
parameter, when I get that type with GetEnumValue.

For example, if I have this type:

TMyType = (mtOne, mtTwo, mtThree);

var
  lMyType: TMyType;

begin
  lMyType := TMyType(GetEnumValue(TypeInfo(TMyType), 'mtTwo'));
  // lMyType is 1 instead of mtTwo
  // now I pass lMyType as a parameter in a function/procedure
  myFunction(lMyType);
end;
  
Shouln't lMyType be equal to mtTwo instead of 1?
How can I get mtTwo from GetEnumValue?

Leonardo M. Ramé
http://leonardorame.blogspot.com
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] GetEnumValue result type

2011-04-18 Thread Hans-Peter Diettrich

Leonardo M. Ramé schrieb:


TMyType = (mtOne, mtTwo, mtThree);

var lMyType: TMyType;

begin lMyType := TMyType(GetEnumValue(TypeInfo(TMyType), 'mtTwo')); 
// lMyType is 1 instead of mtTwo


How do you know? Since ord(mtTwo)=1, you seem to be fooled by the debugger.

DoDi

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel