Re: [fpc-pascal] Re: Delphi's anonymous functions in Free Pascal

2011-11-06 Thread dmitry boyarintsev
On Sun, Nov 6, 2011 at 8:00 AM, Alexander Shishkin alexv...@mail.ru wrote: OK, agreed, this is more readable than Delphi syntax. But ... 1) If we implement lamdas is FPC we will have to support Delphi syntax. Hi-jacking, the thread, and again should FPC chase Delphi forever? Their technical

Re: [fpc-pascal] How to create this union ?

2011-12-26 Thread dmitry boyarintsev
Chelper also has hard-timer converting the structure: It failed on union nf_inet_addr haddr, hmask; so I had to comment it out. Some structures are missing completely. type TAuxType0 = packed record case Integer of 0:(u8 : uint8_t;u8_range : array [0..1] of uint8_t;syslog_level :

[fpc-pascal] libjpeg, libjpeg-turbo - pascal bindings

2012-02-05 Thread dmitry boyarintsev
Hello, Has anyone ever met libjpeg or libjpeg-turbo (by IJG) pascal bindings (for dynamic libraries)? The most commonly used PasJPEG doesn't meet the requirements. If there's none, would it be useful to add them to FCL? (there's a binding for libpng anyway). thanks, Dmitry

Re: [fpc-pascal] Unicodestrings and Assign(File)

2012-05-12 Thread dmitry boyarintsev
Hello Jurgen, I'm assuming that everyone is aware of the solution for this. Every unicode file name still has ANSI-dos name (aka ShortName). You could write a function that would return a short name based on unicode name of a file. And pass the short name to Assign File function. thanks, Dmitry

Re: [fpc-pascal] Re: Unicodestrings and Assign(File)

2012-05-12 Thread dmitry boyarintsev
That's the one I'm talking about. thanks, Dmitry On Sun, May 13, 2012 at 12:52 AM, Reinier Olislagers reinierolislag...@gmail.com wrote: On 13-5-2012 5:59, dmitry boyarintsev wrote: I'm assuming that everyone is aware of the solution for this. Every unicode file name still has ANSI-dos name

Re: [fpc-pascal] Does FPC 2.8.0 can actually still be called Pascal ?

2013-02-28 Thread dmitry boyarintsev
All the new strange features doesn't really matter as long as: 1) the backward compatibility is in place (and or guidelines are given how to make the code compatible with minimal efforts) 2) executable size doesn't suffer much ;) 3) the new target is supported and the existing code can be applied

Re: [fpc-pascal] Re: Generics - how to rewrite TOjectDictionary

2013-04-08 Thread dmitry boyarintsev
You can always use functions, to fight typecasting. function GetMyObject(dic: TStrings; const nm: string): TMyObject; var i : integer; begin if not Assigned(dic) then begin Result:=nil; Exit; end; i:=dic.indexof(nm); // replace with IndexOfName if necessary if (i0) or (i=dic.Count) or not

Re: [fpc-pascal] Re: Generics - how to rewrite TOjectDictionary

2013-04-08 Thread dmitry boyarintsev
please disregard my last note about avoiding the sanity check On Mon, Apr 8, 2013 at 1:52 PM, dmitry boyarintsev skalogryz.li...@gmail.com wrote: You can always use functions, to fight typecasting. function GetMyObject(dic: TStrings; const nm: string): TMyObject; var i : integer

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-18 Thread dmitry boyarintsev
Hello Toru, Not sure if it works with SQLdb or ADO, but it has been working for some other tasks that I've been involved with (not FPC, but delphi based, though). You can have the result as through the select statement. Have a TSQLQuery to run the following query: SET NOCOUNT ON declare @var1

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-19 Thread dmitry boyarintsev
It appears that SQLdb doesn't support (MS) SQL variables. thanks, Dmitry On Fri, Apr 19, 2013 at 8:29 AM, Marcos Douglas m...@delfire.net wrote: On Fri, Apr 19, 2013 at 9:22 AM, Marcos Douglas m...@delfire.net wrote: On Fri, Apr 19, 2013 at 4:26 AM, Toru Takubo tak...@e-parcel.co.jp wrote:

Re: [fpc-pascal] cocoa usage

2009-07-25 Thread dmitry boyarintsev
I am trying to get into cocoa... using lazarus from svn TRUNK I get some files in lcl/units/i386-darwin/cocoa remove these compiled units files. can someone clarify what to use? Shell I copy the lazarus-cc stuff into the lcl stuff above? you don't need to copy from ccr to lcl. upload cocoa

Re: [fpc-pascal] Is there a way to implement COM interface in freepascal?

2009-08-09 Thread dmitry boyarintsev
http://lazarus-ccr.sourceforge.net/fpcdoc/ref/refch7.html#x76-840007 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC reference manual.

2009-09-06 Thread dmitry boyarintsev
I'm looking for a way to program with Cocoa on Mac. some docs for you to read: http://wiki.lazarus.freepascal.org/PasCocoa http://wiki.lazarus.freepascal.org/FPC_PasCocoa thanks, dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] multiple inheritence

2009-10-03 Thread dmitry boyarintsev
On Sat, Oct 3, 2009 at 7:24 AM, David Emerson dle...@angelbase.com wrote: I'd like to create a double-list type, which maintains two parallel lists containing the same elements: one sorted, one unsorted. The reason to have both: sorted - fast search; unsorted - sequential navigation through

Re: [fpc-pascal] Who said Pascal isn't popular

2009-10-16 Thread dmitry boyarintsev
How about creating a Holy War page at the freepascal wiki and moving all notes from this thread there? The page can be become a good source of arguments in all kind of Pascal vs C (or any other language) battles :) As well as good historical notes about pascal language. thanks, dmitry

Re: [fpc-pascal] How to translate this C header struct to Pascal

2009-10-23 Thread dmitry boyarintsev
On Sat, Oct 24, 2009 at 3:26 AM, ik ido...@gmail.com wrote: Doesn't Pascal have something to offer me to deal with it ? Bitwise operations + inline functions. Covers most of the needs. thanks, dmitry ___ fpc-pascal maillist -

Re: [fpc-pascal] Parameter with no type defined?

2009-11-16 Thread dmitry boyarintsev
On Tue, Nov 17, 2009 at 9:57 AM, Graeme Geldenhuys gra...@mastermaths.co.za wrote: If I have a declaration as follows... what type is InData and OutData? Pointers? If it is a generic Pointer type, then why doesn't developers simply declare it as pointer? What is the advantage of not mentioning

Re: [fpc-pascal] How to solve Conversion between ordinals and pointers is not portable

2009-11-17 Thread dmitry boyarintsev
Graeme, why don't you use power of the FPC (and it's pointer maths)? Pascal is language of readable code :) procedure XorBlock(var InData1, InData2; Size: longword); var b1 : PByte; // in Delphi i'd use PByteArray b2 ; PByte; i: longword; begin b1:=...@indata1; b2:=...@indata2; for

Re: [fpc-pascal] How to solve Conversion between ordinals and pointers is not portable

2009-11-17 Thread dmitry boyarintsev
On Tue, Nov 17, 2009 at 12:48 PM, Graeme Geldenhuys gra...@mastermaths.co.za wrote: Changing those declarations to PByteArray type solves the compiler error in FPC. Seems like {$mode delphi} is used. here's faster version of xorblock procedure XorBlockEx(var InData1, InData2; Size: longword);

[fpc-pascal] Escaping keywords

2009-11-24 Thread dmitry boyarintsev
Hello Developers There's Delphi compatibility feature to escape keyword with character. Is there any way to turn the feature off or enable a hint or a note about the escaped keyword used? thanks, dmitry ___ fpc-pascal maillist -

Re: [fpc-pascal] midlet pascal and fpc

2009-12-16 Thread dmitry boyarintsev
On Wed, Dec 16, 2009 at 6:04 PM, Felipe Monteiro de Carvalho felipemonteiro.carva...@gmail.com wrote: I found this when I contacted the authors of Midlet Pascal and they replied saying that it was given to a group of developers which is converting it from C++ to Delphi. But we have still to see

Re: [fpc-pascal] OpenCL

2009-12-28 Thread dmitry boyarintsev
On Tue, Dec 22, 2009 at 2:26 PM, Lourival Mendes mendes.louri...@gmail.com wrote: please correct me if I'm wrong, CUDA work only for NVidia and OpenCL should work for all GPU, right?  and if I got the idea the OpenCL bindings submitted works only for Mac. Can I get and try it on Windows?

Re: [fpc-pascal] Forum merger

2009-12-29 Thread dmitry boyarintsev
I'm not sure if forums are to be merged or not, but why not to start an FPC specific thread on Lazarus forum? For example there're a lot of RTL/FCL specific subject, like this one: http://forum.lazarus.freepascal.org/index.php/topic,8272.msg39707/topicseen.html#new The subject is not LCL related

Re: [fpc-pascal] OpenCL

2009-12-29 Thread dmitry boyarintsev
On Tue, Dec 29, 2009 at 3:36 PM, Lourival Mendes mendes.louri...@gmail.com wrote:   Sorry for my dummy questions, but if I got the idea, the OpenCL implementation, from NVidia for Windows, is available as .dll. and the Pascal binding should be adapted to work with it. You're right. I've updated

Re: [fpc-pascal] OpenCL

2009-12-29 Thread dmitry boyarintsev
On Wed, Dec 30, 2009 at 12:34 AM, Lourival Mendes mendes.louri...@gmail.com wrote: if you can give some tips about some good GPU that can runs with OpenCL on windows. Sorry, i'm not hardware expert. You'd better read NVidia's site about the hardware info. But I'm quite happy with my 8600 GTS.

Re: [fpc-pascal] [OT] which editor - emacs?

2010-01-10 Thread dmitry boyarintsev
I use Lazarus as my primary IDE (i have to use Delphi in windows sometimes). Lazarus is the only IDE i'm using on Mac OS X. I use it, even if develop non-LCL based applications. The best option Lazarus has to offer is Codetools, not available in other environments thanks, dmitry

Re: [fpc-pascal] FPC class syntax was extended to support delphi code

2010-01-13 Thread dmitry boyarintsev
Are these features available for {$mode delphi} only? thanks, dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread dmitry boyarintsev
Does this innovation makes case a function? procedure SomeProc(const v: string); SomeProc ( case Other of a: 'a'; b: 'b'; end; ); Imho, this reduces the code readability. thanks, dmitry

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread dmitry boyarintsev
On Sun, Feb 21, 2010 at 9:03 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: I vote against adding this language feature. It's not pascal-like and actually makes the code harder to read. It also only applies to simple assignment. Case begin..end blocks can do much more than simple

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread dmitry boyarintsev
On Sun, Feb 21, 2010 at 9:22 PM, Marco van de Voort mar...@stack.nl wrote: I'd rather see the time spent on features that really matter (like generics, SEH/COM support, unicode). +1 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Smartlinking public functions

2010-03-06 Thread dmitry boyarintsev
Hello Developers The system expects an application to implement (export) some functions that are to be linked statically. I'm using [public] modifier: function someFunc: Integer cdecl; [public]; alias: '_someFunc'; The linker catches up the function and statically links it with the system

Re: [fpc-pascal] Smartlinking public functions

2010-03-06 Thread dmitry boyarintsev
On Sat, Mar 6, 2010 at 9:14 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: No. And even if we would add a special modifier for that, I don't know how it could be easily implemented for non-Mac OS X platforms (although I realise that you probably need this for Mac OS X, a generic modifier

Re: [fpc-pascal] Smartlinking public functions

2010-03-06 Thread dmitry boyarintsev
Thanks for your help! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] CLX is returning to Delphi 2011

2010-04-06 Thread dmitry boyarintsev
Does Embarcadero offer 2 different way of cross-platform development. Delphi Prism (XDelphi?) with its Mono .Net based development and Delphi 2011 with new CLX? thanks, dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Wanted: permanent or contract developers for a new project

2010-04-14 Thread dmitry boyarintsev
Graeme you can also place the offer here: http://forum.lazarus.freepascal.org/index.php/board,41.0.html thanks, Dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to bind the following c code ?

2010-04-14 Thread dmitry boyarintsev
On Wed, Apr 14, 2010 at 1:38 PM, ik ido...@gmail.com wrote: I do not understand the G_GNUC_CONST part, does anyone here know what it suppose to be ? It's C define. I suspect it would be some GNU-C attribute, that in the end won't be used by Pascal in anyway. You need to find the definition of

Re: [fpc-pascal] One small step for Pascalkind ...

2010-04-19 Thread dmitry boyarintsev
I'd suggest to ask at MacPascal mailist http://lists.sonic.net/mailman/listinfo/mac-pascal It's much better place for asking Xcode related questions. thanks, Dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Question about Deleting elements in Dynamic Array

2010-04-27 Thread dmitry boyarintsev
On Tue, Apr 27, 2010 at 5:42 PM, Bihar Anwar bihar_an...@rocketmail.com wrote: Just say, I have a dynamic array with size=5, and I want to delete elements from the index 0 to 2. Is there a trick (the fastest way) to delete those elements (0 to 2) without moving activities? You won't do it

Re: [fpc-pascal] Question about Deleting elements in Dynamic Array

2010-04-27 Thread dmitry boyarintsev
On Wed, Apr 28, 2010 at 7:24 AM, Bihar Anwar bihar_an...@rocketmail.com wrote: Ok, I'll try to observe the compiled code using debugger and benchmark it if needed. BTW, what do you mean by allocating memory directly? Is there another way to allocate memory for dynamic array besides using

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread dmitry boyarintsev
On Fri, Apr 30, 2010 at 7:42 AM, Bihar Anwar bihar_an...@rocketmail.com wrote: I hope FPC developers will include StringRefCount() to the RTL. Why would you need that? thanks, Dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Is there a StringRefCount() equivalence?

2010-04-30 Thread dmitry boyarintsev
On Fri, Apr 30, 2010 at 1:18 PM, Bihar Anwar bihar_an...@rocketmail.com wrote: Because there are few certain condition when we need to observe what happened to ansistring/unicodestring variable. In my case now, I need it to learn how reference counting works. For example, using Move() on

[fpc-pascal] fpc-xml: SAX_HTML parsing script tags

2010-05-16 Thread dmitry boyarintsev
Hello Is there any known way to parse html files with: script some script with tricky symbols , like that ruins the parsing /script tag? I've not found any better option but to re-implement THTMLReader (copy-paste + modify) and run a custom parser to skip the content of the script tag, and

Re: [fpc-pascal] fpc-xml: SAX_HTML parsing script tags

2010-05-16 Thread dmitry boyarintsev
On Mon, May 17, 2010 at 2:53 AM, Lee Jenkins l...@datatrakpos.com wrote: What about using CDATA section? There's no support for CDATA in the HTML parser. I'm trying to read arbitrary html files, so there's almost no ![CDATA usage. thanks, dmitry ___

Re: [fpc-pascal] would like to open source Ansi C parser

2010-06-10 Thread dmitry boyarintsev
On Fri, Jun 11, 2010 at 2:19 AM, Albert Almeida mago67...@yahoo.com wrote: I was wondering if there were any volunteers out there willing to continue development of this as an Open Source project. This tool may become a full fledged C Header to Pascal conversion tool. I've written an ObjC

Re: [fpc-pascal] playing sound files (linux and windows)

2010-06-14 Thread dmitry boyarintsev
On Mon, Jun 14, 2010 at 5:37 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Has anybody managed to play sound files under both Linux and Windows? Does FPC have a cross-platform API or FCL class for this? I'd offer using OpenAL, however it requires proper libraries to be installed on Linux

Re: [fpc-pascal] playing sound files (linux and windows)

2010-06-15 Thread dmitry boyarintsev
On Tue, Jun 15, 2010 at 10:44 AM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Op 2010-06-14 15:37, Graeme Geldenhuys het geskryf: Has anybody tried SDL (Simple-Direct-Media)?  I know SDL Graphics works well with Free Pascal, but not sure about the Audio part. Audio works just fine. You

Re: [fpc-pascal] playing sound files (linux and windows)

2010-06-15 Thread dmitry boyarintsev
On Tue, Jun 15, 2010 at 3:29 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: I can't find an example for loading a .wav file. I managed to extract the initialization and finalization code for OpenAL from the FCL examples, but now the main part is the call  alSourcePlay(buffer) , but I

Re: [fpc-pascal] 2.5.1: Ansi string constants vs Unicode

2010-07-10 Thread dmitry boyarintsev
On Sun, Jul 11, 2010 at 12:14 AM, Tobias Giesen tobias_subscri...@tgtools.com wrote: I've got 2.5.1 now. I have a string constant like this: const Vec:AnsiString=#$094#$06D; This should just be 8-bit data with no conversion. try const Vec:AnsiString=#$94#$6D; thanks, dmitry

Re: [fpc-pascal] Tool to create C-Header from Pascal source?

2010-07-11 Thread dmitry boyarintsev
On Sun, Jul 11, 2010 at 7:15 PM, Matthias Klumpp matth...@nlinux.org wrote: Is there a tool to generate C headers from Pascal library source files? The Delphi compiler can do this, but I would need a solution for Linux. If there's not such a tool, I would have to do everything by hand, which is

[fpc-pascal] fpc-passrc expression parser (issue #16914)

2010-07-12 Thread dmitry boyarintsev
Hello, Michael Van Canneyt, Sorry, I can't write to the resolved issue (without re-opening) it. - better class tree (split out binary/unary/primitive operators in subclasses) These may break backwards compatiblity; if you prefer to do them yourself, I can say what I have in mind. That's how

Re: [fpc-pascal] windows 32bit cross to 64 ?

2010-08-08 Thread dmitry boyarintsev
On Sun, Aug 8, 2010 at 6:46 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: In the top level directory of your checkout, run make CPU_TARGET=x86_64 all Afterwards, compiler/ppcrossx64 will be the cross compiler (from i386 - x86-64) and compiler/ppcx64 will be the native x86-64 compiler.

[fpc-pascal] darwin external library name

2010-08-25 Thread dmitry boyarintsev
Hi All Is it expected behavior, that explicitly set library name is not used in linking for Drawin target (fpc 2.5.1)? function SomeFunc: Integer; external 'LibName'; 'LibName' is not added to link.res, so {$linklib LibName} is required for successful linking. Docs says nothing about it:

Re: [fpc-pascal] fcl-passrc: Process library source?

2010-08-25 Thread dmitry boyarintsev
On Tue, Aug 24, 2010 at 9:45 PM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: It's not implemented yet - just like fcl-passrc can't parse Program units either.  Based on what I found while looking what to implement for Program unit parsing, it doesn't seem that difficult. Time permitting,

Re: [fpc-pascal] darwin external library name

2010-08-25 Thread dmitry boyarintsev
On Wed, Aug 25, 2010 at 12:58 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: I don't know what the best solution is. Thanks for the explanation, I've had a feeling that's caused by framework/library selection. Should it be added to the documentation? thanks, dmitry

Re: [fpc-pascal] darwin external library name

2010-08-25 Thread dmitry boyarintsev
Another lib naming bug (seems to be darwin only). If the name contains '-' character, the compiler fails to assemble the unit with Error while assembling exitcode 1 (which is strange, since the name should be ignored). the example: function anyfunc2: Integer; external name 'libname'; function

Re: [fpc-pascal] darwin external library name

2010-08-25 Thread dmitry boyarintsev
sorry! wrong external function Name ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fcl-passrc: Process library source?

2010-08-25 Thread dmitry boyarintsev
On Wed, Aug 25, 2010 at 11:54 AM, Graeme Geldenhuys graemeg.li...@gmail.com wrote: Thanks Dmitry, you can go ahead. I'm still busy with fpdoc and DocView fixes. Passrc should be able to parse program units now. At least it shouldn't be failing with error. Program modules doesn't have interface

Re: [fpc-pascal] PostMessage() from a thread (in a thread save manner)

2008-10-20 Thread dmitry boyarintsev
Your code is safe for multiple threads to post to the queue. But you also must make sure, that Processing a messsage from queue, would not break Posting safetiness. The easiest way, is to wrap message extraction into the same fpgApplication.Lock You must also make sure, that no thread can try to

Re: [fpc-pascal] Help with understanding HeapTrc output

2008-11-05 Thread dmitry boyarintsev
Graeme. If you're using Lazarus, you'd probably be interested in using LeakView package. If you write out HeapTrc output into separate file, then LeakView dialog will allow you to read the file, and present the the leaks in compact tree-view style. Also, it will allow you to quick jump by

[fpc-pascal] DWARF line info cannot be used gdb

2008-12-28 Thread dmitry boyarintsev
Hi, all i'm trying to use gdb to debug FPC compiled file with DWARF debug information. fpc -gw3 test.pas here's test.pas listing ---codestart-- procedure TestUp; begin writeln(5); end; begin Testup; writeln('hello world'); end. ---codeend-- the sample compiles, ok, but then i'm trying to

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-28 Thread dmitry boyarintsev
-gw2 does not work either, it gives out identical error message. is it possible that fpc does not generates dwarf2? btw, i'm using latest fpc trunk, and gdb v6.7.50 win32 ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-28 Thread dmitry boyarintsev
It works fine on at least Mac OS X and Linux. I don't know if anyone ever tested it on Windows. If it doesn't work there, it should probably be disabled for that target until someone fixes it (to avoid situations like yours from happening). this odd, i thought debug info (both dwarf and

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-28 Thread dmitry boyarintsev
the bug's been reported (#12872). if i try to fix the bug, should i first to look at PE file writting units? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-28 Thread dmitry boyarintsev
all these command lines did not work fpc -Xe -gw2 test.pas fpc -Aas -gw2 test.pas fpc -Xe -Aas -gw2 test.pas in all three cases gdb returnes invalid dwarf2 offset ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
Jonas, I've added tf_dwarf_relative_addresses to system information for win32 target and have recompiled the compiler. so now whenether i'm using 'gw2' or 'gw3' compiler options i'm getting test.pas(9,1) Fatal: Internal error 200404124 test.pas(9,1) line 'end.' (see source is the at the first

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
thanks Florian and Jonas i've just did it, right before receiving your email. and it made it work. exe is compiled succesfully. gdb is able to set up break points, though warnings are still present. ___ fpc-pascal maillist -

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
i've also tried using external linker -Aas -Xe and it works too. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
compile line fpc -Aas -gw2 test.pas gdb test.exe ... (gdb) b test.pas:7 warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.) warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.) Breakpoint 1 at 0x40144e: file test.pas, line 7. ... break point

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
here you go (i've accidently deleted test.pas, and created new one, naming main.pas, but the code is the same) : (gdb) info line *0x40144e warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.) warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.)

Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-30 Thread dmitry boyarintsev
will try it tonight ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Problem with c header conversion

2009-01-04 Thread dmitry boyarintsev
each union is a separate case for pascal. another thing is that the structure is quite agly and does not reveale the logicals usage. The problem is that pascal does not allow you to use multiple cases in single record, that would require you to declare additional types. _PFColorSize = record

Re: [fpc-pascal] property of an array

2009-01-04 Thread dmitry boyarintsev
1) type StringArray : array of String; defines a StringArray type to be dynamic array. are you sure, that you have SetColumnNames defined as procedure SetColumnNames(names : StringArray); rather than: procedure SetColumnNames(names : array of string); ??? because if you have procedure

Re: [fpc-pascal] for .. in loop implementation

2009-01-07 Thread dmitry boyarintsev
the nice thing about pascal, is that compile support different code compilers syntax: {$mode ...} if anyone likes, he/she can implement additional {$mode} for the compiler, right? this new {$mode} can be included into compiler packages, and if necesssary anyone can rebuild the compiler to support

Re: [fpc-pascal] Calling C functions from FPC

2009-01-26 Thread dmitry boyarintsev
procedure cTest; cdecl; external; it's true for unix functions, but Carbon functions are using mwpascal convention, right? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Calling C functions from FPC

2009-01-26 Thread dmitry boyarintsev
huh?!! well thanks! because i always thought that 'mwpascal' is the same as 'fastcall' (register), except for 'const' parameters. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Using cocoa instead of carbon libraries

2009-01-26 Thread dmitry boyarintsev
See this page: http://wiki.freepascal.org/PasCocoa The carbon apis are no longer supported by apple, Has apple anounced that? and it would be nice to have cocoa apis supported, because of their better integration to the system, and their accessibility features that are basically free when

Re: [fpc-pascal] absolute beginner

2009-01-31 Thread dmitry boyarintsev
Or (still better) which chances are that the code of TProfGrid would compile with FPC ? chances are very high, since FPC supports delphi dialect {$ifdef fpc}{$mode delphi}{$h+}{$endif} you also need to learn about LCL (Lazarus analog of delphi VCL library) and Lazarus itself. just start from

Re: [fpc-pascal] absolute beginner

2009-02-01 Thread dmitry boyarintsev
No, chances are very low. It's a component which will most-probably depend on several vcl-internals with which the FCL is incompatible. Because the FCL has to deal with several widgetsets and OS'es. While Delphi's vcl is windows-only. Chances depend on how component is actually implemented. I

Re: [fpc-pascal] absolute beginner

2009-02-01 Thread dmitry boyarintsev
what is LCL ? A research in the net brought 'Le Crédit Lyonnais', but I doubt that this is the correct anser :) LCL stands for Lazarus Component Library, see this page for more details http://wiki.lazarus.freepascal.org/Lazarus_Documentation If you want to create a delphi-like visual

Re: [fpc-pascal] PasCocoa design

2009-02-13 Thread dmitry boyarintsev
Felipe, i've found that ObjCRuntime unit is introduced with FPC package (objc1.0). So now, there're 2 versions of objc runtimes available for FPC. And I have also converted objc2.0 version, but have not published it yet (just want to make it more cross-pascal). What do you think, if PasCocoa

Re: [fpc-pascal] PasCocoa design

2009-02-13 Thread dmitry boyarintsev
How about adding it to PasCocoa? um.. no, it's a bad idea for now. sorry! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] PasCocoa design

2009-02-13 Thread dmitry boyarintsev
Why? Copyright reasons? nope. no problems with license. the problem might be with PasCocoa design. currently objc2.0 is a stand-alone unit, that can (and should!) be used without objc. The unit links objc2.0 routines, so application compiled with objc20 would never run with objc 1.0 (so Tiger

Re: [fpc-pascal] PasCocoa design

2009-02-13 Thread dmitry boyarintsev
This would also allow to avoid great number of $IFDEFs. as well as increasing application's portability. For example, if Apple releases next version of OSX without objc1.0 support it would be not necessary to recompile the application for the new os and objc2.0.

Re: [fpc-pascal] DirectX applications crash

2009-03-16 Thread dmitry boyarintsev
Hello, if FPC interfaces are working the same that Delphi interfaces do, then you should NEVER call ._Release() explicitly This is (calling _Release()) done my the compiler implicitly: * if variable is no longer available (exiting the function local variable interfaces are released) * if variable

Re: [fpc-pascal] Mac OS X SDL without gcc or XCode

2009-03-17 Thread dmitry boyarintsev
In this case, libSDLmain.a is always available in pre-compiled form (it's automatically compiled along with the rest of the sources). That's also why the FPC SDL unit always links against against that library (so that it works without having to add anything extra in the main program.). Thanks

Re: [fpc-pascal] Mac OS X SDL without gcc or XCode

2009-03-17 Thread dmitry boyarintsev
Yes, that can still be removed. Removed...yes, but shall it be removed in fpc headers? Or should it be removed in jedi-sdl headers first, and only after that fpc sdl headers will be updated? I could make a patch, removing x11 dependancy for darwin, but something tells me, that it would not be

Re: [fpc-pascal] Mac OS X SDL without gcc or XCode

2009-03-21 Thread dmitry boyarintsev
2009-03-21 16:25:08.178 test[694:10b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz. Am i doing something wrong? Nothing. i've got the same warning too. I suspect this is SDL

Re: [fpc-pascal] Interface reference counting

2009-04-02 Thread dmitry boyarintsev
var   d3d: IDirect3D9 = nil; // Direct3D interface no need in this. any interface type variable is always initialized with 'nil' value. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
type TGraemeBoolean = (dbNil, dbFalse, dbTrue); ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
oh sorry, by i've missprinted prefixes: type TGraemeBoolean = (gbNil, gbFalse, gbTrue); // gb prefix stands for Greame Boolean ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
Have a look at $packenum btw if you go that way. what's the reason? i guess it's not to be used for streaming operation. btw, is there $packsets? (for sets aligment?) thanks, dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
No, not that I know. sets are always 32-bit size? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Can I define a custom simple type for my applications?

2009-04-06 Thread dmitry boyarintsev
Oops I apparantly looked at outdated docs (on scenergy): http://www.freepascal.org/docs-html/prog/progsu59.html#x66-640001.1.59 Thanks so much! ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] build case-sensetive issue

2009-04-24 Thread dmitry boyarintsev
hello, i've been rebuilding svn version of fpc i386-linux. i'm building RTL using 'make all install INSTALL_PREFIX=mypath' mypath is located on a Fat32 disk (flash drive). All compiled unit files (.o, .ppu) are copied fine, expect for 'Syscall.o' and 'UnixUtil.o'. they are compiled and present

Re: [fpc-pascal] build case-sensetive issue

2009-04-24 Thread dmitry boyarintsev
thanks for the reply. i guess ppl, using linux os, rarely build on case-insensetive filesystem. Otherwise, they should be aware of such problems. thanks, dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] C to Pascal convertion. Hex Float.

2009-04-28 Thread dmitry boyarintsev
hello Developers. Does anyone have an experience with converting hex-float numbers from C to Pascal? i've converted all OpenCL (cl_platfrom.h, cl.h, cl_gl.h) headers already,except for the following constants: CL_FLT_MAX 0x1.fep127f CL_FLT_MIN 0x1.0p-126f CL_FLT_EPSILON

[fpc-pascal] OpenCL, Re: C Hex Float.

2009-04-28 Thread dmitry boyarintsev
Anyway. does FPC community need converted OpenCL headers? i'd like to share them. Should they be converted to the proper structure first (/src, make, fpmake)? there're only 2 files anyway. I still have not found any reasonable way to convet c-hex-float number to pascal. i'm not sure if it's nice

Re: [fpc-pascal] OpenCL, Re: C Hex Float.

2009-04-28 Thread dmitry boyarintsev
thanks for the reply Marco I'm working in vision, and I'd be very interested in OpenCL headers. you can download converted headers from here: http://wnsoft.com/~dima/opencl.zip original c headers are available here: http://www.khronos.org/registry/cl/ cl.h and cl_platform.h is united into

Re: [fpc-pascal] fpselect does not work on linux

2009-05-09 Thread dmitry boyarintsev
hello Rainer, do you check the socket's writability by fpFD_ISSET(sck, fds) ? thanks, dmitry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to use OpenGL 2.0 fatures

2009-05-09 Thread dmitry boyarintsev
Hello Lord Satan uses ...gl, glext... ... if not Load_GL_version_2_0 then begin writeln('OpenGL 2.0 is not supported'); Halt; end; ... Load_GL_version_2_0 function is declared at glext unit. you should call it before calling ANY 2.0 OpenGL function. also check out functions

  1   2   3   >