<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Please ignore this. FPC has generated this as
an error. This is an old discussion from August</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=urbansound@sbcglobal.net
href="mailto:urbansound@sbcglobal.net">Urbansound</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=fpc-pascal@lists.freepascal.org
href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, August 16, 2005 9:25
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [fpc-pascal] Windows Type
LPARAM, WPARAM</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've been working with FPC 2.0.0 and Dev-Pas
for some GUI efforts and another programmer pointed out an interesting thing,
regarding the LPARAM and WPARAM types. I hope I'm not kicking up old
dust, but for the sake of clarification if we may...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The Microsoft architecture affiliates these two
keywords as "Types", based upon case sensitivity, among the variouse
usage they apply from a C perspectieve, where in Pascal, case is
insensitive. In Dev-Pas' gui template, they assign these
same words as follows... </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>//--------- </FONT></DIV>
<DIV><FONT face=Arial size=2>function WindowProc(Window: HWnd; AMessage,
WParam,<BR> LParam:
Longint): Longint; stdcall; export;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>LParam becomes Longint, but it is a TYPE
actually.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Without case sensitivity in Pascal, these same
words can become declared variables as above, which leads to ambiguous
code.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial
size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>//----------</FONT></DIV>
<DIV><FONT face=Arial size=2>Consider the useage otherwise as ...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>function WindowProc(Window: HWnd; AMessage: UINT;
WParam :
WPARAM;<BR>
LParam: LPARAM): LRESULT; stdcall; export;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In hopes of avoiding a discussion on the merits
of case-sensitivity in compiler design... </FONT><FONT face=Arial
size=2>Is there any way to switch on case sensitivity or otherwise a switch to
have references become reserved words, such that their case insensitive nature
can be raised as an error in the above cases? LPARAM AND WPARAM are
consistently present in most windows usage.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>i.e. LParam: Longint
> would raise an error for reserved
word.</FONT></DIV>
<DIV><FONT face=Arial
size=2> LParam:LPARAM
> would raise an error as a redundant
cast</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> xxx:Lparm
would cast xxx to any case manner of Lparam/Wparam</FONT></DIV>
<DIV><FONT face=Arial size=2>
</FONT></DIV>
<DIV><FONT face=Arial size=2>I suppose that there are a number of cased
words in Windows that make the consideration impractical
overall, </FONT><FONT face=Arial size=2> but is this strictly a
manner of managment on the programmers behalf, to watch declarations and scope
closely, or could it ever be managed as a switched option?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Mike</FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>fpc-pascal
maillist -
fpc-pascal@lists.freepascal.org<BR>http://lists.freepascal.org/mailman/listinfo/fpc-pascal<BR></BLOCKQUOTE></BODY></HTML>