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

2012-05-13 Thread Sven Barth
On 12.05.2012 22:18, Jorge Aldo G. de F. Junior wrote: does TFileStream use the same code as assign ? you could create a TFileStream instance and then use AssignStream to a regular file type and keep on using plain old read/write... not tested here, but could be worth a try... Currently the

[fpc-pascal] Parsing parameters inside an interpreter

2012-05-13 Thread luciano de souza
Hello all, I trying to build a very small interpreter. I can type commands like: $ add "Luciano de Souza" luchya...@gmail.com Somewhere in my code, I can have something like: procedure parse(commandline: string; var params: array of string); In this case, the commandline has the format: "add %

[fpc-pascal] converting c code

2012-05-13 Thread Darius Blaszyk
I'm struggling to convert a simple for loop from C to pascal. The code is shown below (as is a trace of the loop parameter values). I'm a bit puzzled how this should look elegantly in pascal. Anyone has an idea? Regards, Darius unsigned nc = 4; for (unsigned i = 0, j = nc-1; i < nc; j

Re: [fpc-pascal] converting c code

2012-05-13 Thread Marco van de Voort
In our previous episode, Darius Blaszyk said: > I'm struggling to convert a simple for loop from C to pascal. The code is > shown below (as is a trace of the loop parameter values). I'm a bit puzzled > how this should look elegantly in pascal. Anyone has an idea? > > Regards, Darius > > > unsi

Re: [fpc-pascal] converting c code

2012-05-13 Thread Mattias Gaertner
On Sun, 13 May 2012 15:09:15 +0200 Darius Blaszyk wrote: > I'm struggling to convert a simple for loop from C to pascal. The code is > shown below (as is a trace of the loop parameter values). I'm a bit puzzled > how this should look elegantly in pascal. Anyone has an idea? IMHO the C code is

Re: [fpc-pascal] converting c code

2012-05-13 Thread Dimitri Smits
- Oorspronkelijk e-mail - > On Sun, 13 May 2012 15:09:15 +0200 > Darius Blaszyk wrote: > > > I'm struggling to convert a simple for loop from C to pascal. The > > code is shown below (as is a trace of the loop parameter values). > > I'm a bit puzzled how this should look elegantly in pa

Re: [fpc-pascal] converting c code

2012-05-13 Thread Darius Blaszyk
Thanks to all. I got the code working now. Regards, Darius On May 13, 2012, at 3:09 PM, Darius Blaszyk wrote: > I'm struggling to convert a simple for loop from C to pascal. The code is > shown below (as is a trace of the loop parameter values). I'm a bit puzzled > how this should look elegan

Re: [fpc-pascal] FpProfiler patch to compile with fpmake

2012-05-13 Thread Darius Blaszyk
Thanks Michalis, I assigned the report to myself. Regards, Darius On May 12, 2012, at 3:19 PM, Michalis Kamburelis wrote: > Hi, > > I'm not sure if anyone is actively watching the Mantis issues for FpProfiler, > so I thought I'll mention it here: I submitted a patch to fix the compilation >

[fpc-pascal] Adding USB library to FPC

2012-05-13 Thread Christo Crause
I have seen several header translations of the various libusb variants (0.1, 1.0 & win32) scattered on the web and forums. I have also noticed several dead links, a typo or two and some missing function declaration in some of the available pascal translations. Would it not make sense to include a