Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal

fpc-pascal · 2011-04

  1. Installing FPC 2.5.1 in Mac OS X

    I am trying to install FPC 2.5.1 in Mac OS X. So I tryed this steps: 1> I have FPC 2.4.2 working fine 2> cd fpctrunk make clean make all sudo make install 3> In Lazarus…

    Felipe Monteiro de Carvalho, Jonas Maebe, Marco van de Voort
    12
  2. Readline substitute

    Hi! I want to equip a program with a command line and therefore want a powerful and user-friendly input prompt. Currently I use ReadLn(CmdLine); which is not as…

    Johann Glaser, Bernd, Jonas Maebe
    8
  3. read lines at end of file

    Need to read the last 4 lines (txt) of a very large log file 100M bytes, 100k lines or more lots of times - of course I can read through the file in the normal way but…

    John Lee, José Mejuto, Mattias Gaertner
    9
  4. How to translate this union ?

    I'm trying to translate the following union<https://github.com/ik5/sofia-sip/blob/master/src/lib/sui.inc#L199>to Pascal, but I do not understand it, and so does h2pas.…

    ik, Ludo Brands, Sven Barth
    11
  5. nested macros in C headers

    I found this: http://pastebin.com/T4jkeE6F in a zip file called vfp.tar.bz4 somewhere on the web, it seems not maintained since ages but obviously it must have compiled…

    Bernd, Marco van de Voort, Paulo Costa
    8
  6. Generics feature status

    I see now that generics have improved a lot since latest release, we even have Delphi compatible syntax in Delphi mode. Recursive generic type is supported as well now…

    leledumbo, Anthony Walter, Paul Ishenin
    3
  7. How to get the offset of a record

    In Turbopascal it was possible with offs() type rectype = record var1 : longint; var2 : longint; var3 : boolean; end; var o : longint; recvar : rectype; o := offs(…

    Rainer Stratmann, Aleksa Todorovic, Florian Klämpfl
    10
  8. OLE & COM Support

    How is the COM support in FPC nowadays? I have a project coming up that I may use FPC for. Lee

    Lee Jenkins
    0
  9. Initialize object variables

    Is there any way to initialize object variables, other than writing an init method? So something like: myobj = object myvar: word = $ffff; end; Regards, Darius

    Darius Blaszyk, Howard Page-Clark, Jürgen Hestermann
    3
  10. run pascal programs as scripts

    I would like to execute small pascal programs like normal unix scripts. For example: #!/usr/bin/instantfpc begin writeln('shebang executed'); end. Has anyone already…

    Mattias Gaertner, Darius Blaszyk, Felipe Monteiro de Carvalho
    43
  11. Working with PUCS4Char and UCS4String

    I'm getting a pointer to wchar_t which is PUCS4Char on linux and osx. To convert an UCS4String to WideString there is UCS4StringToWideString. But how can I convert…

    Ludo Brands
    0
  12. dependency problem when installing x86_64 on centos 5.5

    Hi I'm trying to install fpc 2.4.2 using yum on centos 5.5 : yum localinstall fpc-2.4.2-1.x86_64.rpm It fires an error : Missing dependency : libtinfo.so.5()(64bit) is…

    Julien Devillers, Jonas Maebe
    1
  13. android JNI JString to String

    I have a strange problem, I pass data from the android String via JNI. pass data from FreePascal wideString successfully using the following code NewString: function…

    herux, Jonas Maebe, Ludo Brands
    5
  14. A few doubts about C to pascal header translations:

    I've come across some constructs that I'm not sure how to translate: A procedure where one of the arguments is declared as: size_t arg; also a macro where appears:…

    Paulo Costa, Marco van de Voort
    3
  15. More doubts on C to pascal header translations:

    I saw that h2pas translated: typedef void(*callback)(int pos, void* userdata); to callback = procedure (pos:cint; var userdata:pointer);cdecl; shouldn't it be? callback…

    Paulo Costa, Marco van de Voort
    2
  16. FPImage and GetDataLineStart

    Hi, I need to write a function that replaces TLazIntfImage by using fpImage, and I can't find an alternative to GetDataLineStart. How can I replace it?. Leonardo M. Ramé

    Leonardo M. Ramé, Felipe Monteiro de Carvalho, Florian Klämpfl
    62
  17. find return adress of a procedure/function

    How to find the return adress of the calling code of a procedure/function? Where in the stack is the information to the return adress? stack + - x? How to acess to the…

    Rainer Stratmann, Sven Barth
    4
  18. delphi compatibility

    Just downloaded & tried to registry.pas - for accessing win registry. It uses SysUtils, WinTypes, WinProcs, Messages, Classes,ShellAPI My standard v242 fpc win…

    John Lee, Marco van de Voort, Matt Emson
    2
  19. FileGetAttr fails on TrueCrypt partition

    g: is the XP system volume. x: is the truecrypted NTFS partition. No problem to set / get / show file attributes with Win32 GUI on both volumes. Same with attrib.exe on…

    reynolight, Jonas Maebe, Michael Van Canneyt
    5
  20. SDL example

    Hi I am on fpc/packages/sdl/examples. # ppcrossarm demo03.pas -darm -XD -CX Free Pascal Compiler version 2.5.1 [2011/03/01] for arm Copyright (c) 1993-2010 by Florian…

    Nataraj S Narayan, Michael Van Canneyt
    3
  21. Message methods

    I'm trying to understand how message methods work in FPC. For this I created a simple app that shows a message. I also created a second (identical form) and I expected…

    Unknown author, Darius Blaszyk, Jorge Aldo G. de F. Junior
    3
  22. Font reading library

    I just tought I'd ask: Do we have a Pascal library for reading font files? TTF and other formats. Obtain the information about the font and the glyphs. Felipe Monteiro…

    Felipe Monteiro de Carvalho, Darius Blaszyk, Helmut Hartl
    13
  23. GDB Case insensitive Search

    I can't figure out how to make a case insensitive search in GDB. The GDB docs only say that you can do the following but don't give much else or explain regexp.…

    Richard Ward
    0
  24. New to freepascal and how to translate my delphi program.

    I am new to free pascal, but have some experience with delphi. I wrote a program to control a milling machine (Elektor Profiler, see elektor.nl/ forum program Doit).…

    P. vanderWal, Felipe Monteiro de Carvalho, Jeppe Johansen
    5
  25. stripping HTML

    is there any existing FPC code (even external libraries with bindings) to strip HTML tags from files, including adequate removal of scripts, comments and other…

    Roland Schäfer, Felipe Monteiro de Carvalho, leledumbo
    7
  26. Assembling (pipe) /Users/{standard input}:2540:suffix or operands invalid for `cmovns'

    building LCL with OPT="-Cr" causes the problem in anchoreditor.pas (Assembling (pipe) /Users/{standard input}:3839:suffix or operands invalid for `cmovns') . Used…

    Ludo Brands
    1
  27. Self pointer existence

    Hi When does the self pointer's value become valid? I need a reference to the object being created inside the object's own create method. The last statement in Create…

    Wimpie Nortje, Mattias Gaertner
    2
  28. Re; New to freepascal and how to translate my delphi program

    Thanks for the quick response. It was just the things I was looking for. Piet

    piet
    0
  29. DIFF Pascal component

    I was wondering if anyone knows a good Pascal component for generating a diff in the standard format. Googling I found TDiff here: http://angusj.com/delphi/ Maybe there…

    Felipe Monteiro de Carvalho
    0
  30. Variable argument list for cdecl functions

    Hi How do one access the array of const members for a function declared as cdecl? Eg. function A(args: array of const): integer;cdecl; I get a warning that cdecl'ared…

    Wimpie Nortje, Jonas Maebe
    1
  31. Availability of RawByteString

    we need to use RawByteString with FreePascal and I saw it's implemented in cpstrnew which is in progress. Do you know when this branch will be integrated into a fpc…

    Jean-Marc BOTTURA, Florian Klaempfl
    1
  32. android share library with classes unit

    I managed to compile and run the library for android on emulator, which I compile the project just a libhellojni.so compile using paramater like this ppcarm -Scghi -O1…

    herux, Dariusz Mazur, Felipe Monteiro de Carvalho
    7
  33. generic, specialize keywords in mode delphi in FPC trunk

    Hello. Following program: program a; {$mode delphi} type generic TGen<T> = class end; TSpc = specialize TGen<Integer>; begin end. compiles with FPC 2.4.2, but not with…

    cobines, leledumbo, Paul Ishenin
    8
  34. TMenu - barbreak Delphi Compatbility.

    Guys. In Delphi you can set the break to barbreak to break the menu in half , whats the best way ( if possible to do this in lazarus ) ? Delphian

    Justin Smyth, Ben, Felipe Monteiro de Carvalho
    5
  35. Inherit interface from 2 interfaces

    Can i do that? type IIntf3 = interface(IIntf11, IIntf2) .... end; Thanks in advance. Zaher Dirkey

    Zaher Dirkey, Andreas Dorn, Flávio Etrusco
    11
  36. Delphi 2010 code crashing in Lazarus (0.9.30, Win32)

    I have a DLL that was compiled using Delphi 2010 (or Delphi XE, not sure which...), and this DLL uses PWideString in a bunch of it's interfaces. I have some code that…

    Paul Nicholls, Sven Barth
    1
  37. Is there a problem on the lazarus mailing list?

    Sorry for the off-topic, but I sent a message yesterday to the lazarus mailing list and it hasn't appeared. In fact there aren't new messages since last Sunday. Does…

    Luca Olivetti, Juha (gmail, Vincent Snijders
    6
  38. Strange arm-linux cross-compilation errors

    In this thread: http://www.lazarus.freepascal.org/index.php/topic,12585.0.html I though that maybe posting here would help, since the user has some problems with some…

    Felipe Monteiro de Carvalho, herux, Jonas Maebe
    2
  39. Problems with GetMem

    ZeelandNet Webmail I get strange errors when using GetMem. In my app I keep on allocating and freeing memory in a variable. At a certain moment I do keep getting a…

    Unknown author, Darius Blaszyk, Jonas Maebe
    4
  40. Parsing commandline parameters with wildcards on Linux

    I ran into a problem with resolving commandline parameters, due to wildcard expansion by bash. Consider the following code: for i := 1 to paramcount do writeln(i,':…

    Bart, David W Noon, Jonas Maebe
    8
  41. Problems with an FPC server

    The server hosting the FPC mailing lists, ftp site, wiki and community site has crashed badly yesterday. Almost everything has been restored from backup in the mean…

    Jonas Maebe, ik
    1
  42. Compiling android example

    http://wiki.lazarus.freepascal.org/Android_Interface/Native_Android_GUI I've downloaded the example of the android application, done the following: A. Installed…

    Amit Bueno, Felipe Monteiro de Carvalho
    2
  43. "is" for class references

    Is there an equivalent to "is" for class references? type CNodeContent= class of TNodeContent; procedure walkContent(node: CNodeContent); begin…

    Mark Morgan Lloyd, Marco van de Voort
    2
  44. When compiling with gdb and dwarf code works, no gdb and dwarf, segfault

    I have this weird problem, that when I compile my code (FPC 2.5.1) with debug information (gdb, dwarf) my code works properly. When I remove the debug information,…

    ik
    0
  45. TFPImageCanvas TextOut raise an exception

    When I try to do the following: Canvas.TextOut(5, WhereY, Text); to an image, I get the exception of PixelCanvasException with the message of Not Available. How can I…

    ik, Felipe Monteiro de Carvalho
    3
  46. Test, please ignore

    Florian Klämpfl
    0
  47. Creating windows cross arm-linux ppcarm compiler.

    How do I build windows ppcarm cross arm-linux fpc? Amit

    Amit Bueno, Felipe Monteiro de Carvalho, Henry Vermaak
    4
  48. regex unit and word boundaries

    Does the Regex unit included with FCL support word boundaries? eg: the \b tag as used by some other regex libraries. If the Regex unit does support it, what syntax must…

    Ben Smith, ik
    2
  49. utf8bidi and freebidi in rtl

    Is there a reason why both units are not deployed by FPC ? Ido LINESIP - Opening the source for communication http://www.linesip.com http://www.linesip.co.il

    ik, Zaher Dirkey
    2
  50. Library for network calculations

    Is there an fpc library for TCP/IP network calculations, like computing subnets, broadcast address etc. Frank Church =======================…

    Frank Church, Mark Morgan Lloyd, Michael Van Canneyt
    2