[M3devel] how to write constants and deal with full range unsigned types??

Jay K jay.krell at cornell.edu
Sat Aug 31 18:55:11 CEST 2013

This is a recurring problem esp. for Win64.

AMD64_NT gets this far:


PROCEDURE GetFileHandle(hd: DWORD; ds: FileWin32.DirectionSet): File.T =
  VAR h := WinBase.GetStdHandle(hd);
  END GetFileHandle;

The hd values are small negative numbers.
DWORD is unsigned 32bit.

This area doesn't seem to work well, doesn't interoperate with C well.

(and then the stack goes unaligned raising an exception)

 - Jay

From: jay.krell at cornell.edu
To: m3devel at elegosoft.com
Date: Sat, 31 Aug 2013 06:17:08 +0000
Subject: [M3devel] how to write constants?

What is the right way to do this for 64bit systems?

  other       : INT32 = 16_FFFFFFFF;

"../src/win32/WinUser.i3", line 1321: warning: value not assignable (range fault)
  WS_POPUP       : INT32 = 16_80000000;

"../src/win32/WinVer.i3", line 37: warning: value not assignable (range fault)

I'm guessing..
 other : INT32 := -1;
VS_FFI_SIGNATURE    : INT32 = -17890115; (* 16_FEEF04BD *)


 - Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130831/f149c0b6/attachment-0002.html>

More information about the M3devel mailing list