Re: [fpc-pascal] documentation for file handling, reset, rewrite, errors?

2009-02-11 Thread Michael Van Canneyt


On Tue, 10 Feb 2009, Ken G. Brown wrote:

> I cannot seem to find the good docs for the file handling routines assign, 
> rewrite and reset in the pdf's that came with fpc-2.2.2. Where might the best 
> ones be?
> I have:
> User's Manual.pdf
> Units Reference Guide.pdf

Normally, the routines are documented here.

> Programmer's Manual.pdf
> Language Reference Guide.pdf
> Free Component Library.pdf
> Compiler Switches.pdf
> Code Documented.pdf
> 
> I would like to find good descriptions of how they work, along with error 
> handling and examples of how 
> to how to best use them.
> 
> eg. can an internal memory based file be set to be written and read at the 
> same time? 

Yes.

> Is the file read position independent of the write position?

This kind of thing is not explained.

> 
> If the internal file has been written to the end and the write operation is 
> finished but 
> the file is still open for writing, what needs to be done in order to start 
> reading the file from the beginning?

With standard file I/O, this is not possible.

> 
> Are streams available for reading and writing and are they preferable to 
> while not eof (inFi) read(inFi) 
> then write(outFi)?

They are.

> 
> Are exceptions useful?

Yes :-)

> 
> Examples?
> 
> My goal is to create an internal file then dump it to a system usb printer.

>From your questions, I think  you're better off using TMemoryStream and class
based programs. They're more flexible than the standard Pascal file I/O.

> 
> I've found an example of writing to a pipe using assignlst (f,'|/usr/bin/lpr 
> -m'); that seems to sorta work,
> from here: , 2nd message.
> Is that a good way to do output to a printer?

On linux/unix there is no other reliable way.

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


[fpc-pascal] REQ: official FPC's FCGI framework

2009-02-11 Thread Bee

Hi all,

FPC has pretty usable support for web based development. Currently FPC 
supports it through CGI and Apache module. IMO, there's one more support 
that should be added officially: FastCGI. The initial work has been done 
by ExtPascal project. But, somehow I found it a bit problematic if it's 
compiled by FPC on non-Windows platform, especially with thread-related.


Hence, I now request for official support from FPC to provide FCGI 
framework as the third alternative for web based application 
development. Later, this official framework could be used as alternative 
FCGI framework for ExtPascal project.


What do you think? TIA.

-Bee-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] REQ: official FPC's FCGI framework

2009-02-11 Thread Michael Van Canneyt


On Wed, 11 Feb 2009, Bee wrote:

> Hi all,
> 
> FPC has pretty usable support for web based development. Currently FPC
> supports it through CGI and Apache module. IMO, there's one more support that
> should be added officially: FastCGI. The initial work has been done by
> ExtPascal project. But, somehow I found it a bit problematic if it's compiled
> by FPC on non-Windows platform, especially with thread-related.
> 
> Hence, I now request for official support from FPC to provide FCGI framework
> as the third alternative for web based application development. Later, this
> official framework could be used as alternative FCGI framework for ExtPascal
> project.
> 
> What do you think? TIA.

I see no reason why this could not be done. Will you coordinate the efforts?

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


Re: [fpc-pascal] Origin of FPC features

2009-02-11 Thread leledumbo

I see there are quite a lot of differences from my guessing, I'll fix them
up. When I have time, I'll also add it to the wiki. Thanks for all your
replies.
-- 
View this message in context: 
http://www.nabble.com/Origin-of-FPC-features-tp21927731p21951053.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

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


Re: [fpc-pascal] REQ: official FPC's FCGI framework

2009-02-11 Thread Bee

I see no reason why this could not be done. Will you coordinate the efforts?


I'd like to help, especially on testing and bug fixing. But I don't 
think I have enough knowledge about threading and FCGI internal work. I 
need people who have the expertise on those 2 fields to do the initial 
work. ExtPascal author (Wanderlan) doesn't seem very interested to 
support non Windows platform as he mostly works on Windows (using Delphi).


I'm also quite active in ExtPascal project though mostly on testing and 
bug fixing but I don't do much on the real coding work. Some enhancement 
suggestions are also came as my request (CGI gateway, Mac support, 
enumeration, etc). I can help on the same things here.


-Bee-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Origin of FPC features

2009-02-11 Thread OCTAGRAM

>> Assembler integrationUCSD? Turbo?AT&T and Intel
Should it be considered as idea?

>> External references  UCSD? Turbo?-
This one as well. A very basic feature.

>> Operator overloading Pascal-XSC  -
>Ideas from C++
C++ originated in 1991 or so. Operator overloading was in Ada 83 (which
itself existed some time before ISO standard)
http://archive.adaic.com/standards/83lrm/html/lrm-06-07.html

>> Function / Procedure overloading Delphi  -
>Ideas from C++ (FPC had it long before Delphi)
Again, Ada 83 :)
http://archive.adaic.com/standards/83lrm/html/lrm-06-06.html

>> Bitpacked Structures Native FPC  -
Again, Ada 83 :)
http://archive.adaic.com/standards/83lrm/html/lrm-13-04.html

>> Generics Native FPC  -
> Ideas from C++
Well, Ada 83 also had generics, but they might differ from FPC's ones.

> Thread ProgrammingNative FPC? Delphi? Bringing threads to language
> level
Ada 83 had them already, but FPC's implementation might be a bit different.

>From one point of view, FPC developers usually don't know Ada (there is an
opinion that FPC hadn't happen if its founders knew Ada that time). From
another point of view, FPC developers and Ada compiler developers are
working on a similar problems and are likely to produce solutions that are
very similar.

-- 
View this message in context: 
http://www.nabble.com/Origin-of-FPC-features-tp21927731p21953620.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

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


Re: [fpc-pascal] Origin of FPC features

2009-02-11 Thread Florian Klaempfl
OCTAGRAM schrieb:
>>> Assembler integration   UCSD? Turbo?AT&T and Intel
> Should it be considered as idea?
> 
>>> External references UCSD? Turbo?-
> This one as well. A very basic feature.
> 
>>> Operator overloadingPascal-XSC  -
>> Ideas from C++
> C++ originated in 1991 or so. Operator overloading was in Ada 83 (which
> itself existed some time before ISO standard)
> http://archive.adaic.com/standards/83lrm/html/lrm-06-07.html

Not in FPC.

> 
>>> Function / Procedure overloadingDelphi  -
>> Ideas from C++ (FPC had it long before Delphi)
> Again, Ada 83 :)
> http://archive.adaic.com/standards/83lrm/html/lrm-06-06.html

Not in FPC, when I designed overloading, I knew nothing about Ada so the
ideas came from C++.

> 
>>> Bitpacked StructuresNative FPC  -
> Again, Ada 83 :)
> http://archive.adaic.com/standards/83lrm/html/lrm-13-04.html

See above.

> 
>>> GenericsNative FPC  -
>> Ideas from C++
> Well, Ada 83 also had generics, but they might differ from FPC's ones.

See above.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] documentation for file handling, reset, rewrite, errors?

2009-02-11 Thread Ken G. Brown
Thx!

At 9:37 AM +0100 2/11/09, Michael Van Canneyt apparently wrote:
>On Tue, 10 Feb 2009, Ken G. Brown wrote:
>
>> I cannot seem to find the good docs for the file handling routines assign, 
>> rewrite and reset in the pdf's that came with fpc-2.2.2. Where might the 
>> best ones be?
>> I have:
>> User's Manual.pdf
>> Units Reference Guide.pdf
>
>Normally, the routines are documented here.

Ah, ok, I was searching for Reset and in the Units Reference Guide it oddly 
comes up #23 in the list. I didn't happen to catch it that far down.
This is what I was looking for.

Ken G. Brown

> > Programmer's Manual.pdf
>> Language Reference Guide.pdf
>> Free Component Library.pdf
>> Compiler Switches.pdf
> > Code Documented.pdf



> > I've found an example of writing to a pipe using assignlst 
> > (f,'|/usr/bin/lpr -m'); that seems to sorta work,
>> from here: , 2nd message.
>> Is that a good way to do output to a printer?
>
>On linux/unix there is no other reliable way.
>
>Michael.
>___
>fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>http://lists.freepascal.org/mailman/listinfo/fpc-pascal

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


Re: [fpc-pascal] REQ: official FPC's FCGI framework

2009-02-11 Thread Bee

http://cryp.to/publications/fastcgi/

I found the article shows very good reasons why we should start to work 
in or support FCGI instead of plain CGI. ;) While I'm using ExtPascal's 
FCGI, I can debug my FCGI app (using Lazarus) as if it's a normal 
desktop application. Something that I couldn't do when using Powtils. :)


-Bee-
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal