Re: [fpc-pascal] bug or feature

2021-01-01 Thread Sven Barth via fpc-pascal

Am 01.01.2021 um 19:21 schrieb Mattias Gaertner via fpc-pascal:

Hi,

library test;
procedure Test; begin end;
exports
   Test name 3 'abc';
   //^^^
end.

It's a bug. Please report.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] bug or feature

2021-01-01 Thread Michael Van Canneyt via fpc-pascal



On Fri, 1 Jan 2021, Mattias Gaertner via fpc-pascal wrote:


Hi,

library test;
procedure Test; begin end;
exports
 Test name 3 'abc';
 //^^^
end.


I think this is a bug. Delphi also barfs on it.


However the following does work:

exports
  Test index 1 name 'abc';

Although incomplete, the following does not mention you can include a number:

http://docwiki.embarcadero.com/RADStudio/Sydney/en/Writing_Dynamically_Loaded_Libraries

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] bug or feature

2021-01-01 Thread Mattias Gaertner via fpc-pascal
Hi,

library test;
procedure Test; begin end;
exports
  Test name 3 'abc';
  //^^^
end.


Mattias
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] GetClipboardFormatName causing an Error 216

2021-01-01 Thread James Richters via fpc-pascal
I have my project working the way I want it to, but I have one little quirk I 
am hoping to fix.
When I look at the clipboard, the entry for MSDEVColumnSelect has zero length. 
I’m not too familiar with PChars, but is there a way to set it to zero length?
I set it to #0 and it works ok with the #0 in there with Notepadd++ but I think 
it’s technically not correct.
Is there some way to call   SetClipboardData(); to have it write just the 
format ID and zero length data?
 
Here’s a code snip of the relevant section:
 
 
  EmptyClipBoard;
  h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
  pp:=pchar(GlobalLock(h));
  move(p^,pp^,l+1);
  GlobalUnlock(h);
  res:=(SetClipboardData(CF_OEMTEXT,h)=h);
  h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
  pp:=pchar(GlobalLock(h));
  OemToCharBuffA(p,pp,l+1);
  SetClipboardData(CF_TEXT,h);
  GlobalUnlock(h);
  If Vertical then
Begin
  q:=#0;
  h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
  pp:=pchar(GlobalLock(h));
  move(q^,pp^,l+1);
  SetClipboardData(MSDEVColumnSelect,h);
  GlobalUnlock(h);
  q:=#2#0;
  h:=GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE,l+1);
  pp:=pchar(GlobalLock(h));
  move(q^,pp^,l+1);
  SetClipboardData(BorlandIDEBlockType,h);
  GlobalUnlock(h);
End;
 
 
James
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal