On Tue, 16 Aug 2005, Urbansound wrote:

> Hi,
> 
> 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...
> 
> 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... 
> 
> //--------- 
> function WindowProc(Window: HWnd; AMessage, WParam,
>           LParam: Longint): Longint; stdcall; export;
> 
> LParam becomes Longint, but it is a TYPE actually.
> 
> Without case sensitivity in Pascal, these same words can become declared 
> variables as above, which leads to ambiguous code.
> 
> 
> //----------
> Consider the useage otherwise as ...
> 
> function WindowProc(Window: HWnd; AMessage: UINT; WParam : WPARAM;
>                     LParam: LPARAM): LRESULT; stdcall; export;
> 
> In hopes of avoiding a discussion on the merits of case-sensitivity in 
> compiler design...  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.

Pascal is case insensitive, and that will not change any time soon, if ever.
99.99% of all code out there would stop working if it was made case sensitive.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to