Re: [fpc-pascal] Help on using direct pascal compiler

2017-10-03 Thread Michael Van Canneyt



On Mon, 2 Oct 2017, sjc snc wrote:


I want to use fpc.exe directly to convert pascal code to executable (*
.exe) file. I do not know how to use it. When it comes to the fpc.exe file,
it tells you to press enter then it disappears automatically. I need to
create a project on visual basic to convert pascal code to executable (*
.exe), and then run it with a button in my program. Thank you for reading
and please help me.


You need to specify the file that fpc.exe needs to convert.

If you have a file called, for example, 'hello.pas' that looks like this:

program hello;

begin
  Writeln('Hello, world!');
end.

then the command

fpc hello.pas

will convert it to an executable.

If you don't give any options to fpc, it will display the help, and asks
you to press enter, this is what you have observed.

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

Re: [fpc-pascal] Help on using direct pascal compiler

2017-10-03 Thread Tomas Hajny
On Tue, October 3, 2017 10:00, Michael Van Canneyt wrote:
> On Mon, 2 Oct 2017, sjc snc wrote:


Hello,

The original poster is not subscribed to the list (although he didn't
mention it in his post, unfortunately), thus I added him to Cc: now.

>> I want to use fpc.exe directly to convert pascal code to executable (*
>> .exe) file. I do not know how to use it. When it comes to the fpc.exe
>> file,
>> it tells you to press enter then it disappears automatically. I need to
>> create a project on visual basic to convert pascal code to executable (*
>> .exe), and then run it with a button in my program. Thank you for
>> reading
>> and please help me.
>
> You need to specify the file that fpc.exe needs to convert.
>
> If you have a file called, for example, 'hello.pas' that looks like this:
>
> program hello;
>
> begin
>Writeln('Hello, world!');
> end.
>
> then the command
>
> fpc hello.pas
>
> will convert it to an executable.
>
> If you don't give any options to fpc, it will display the help, and asks
> you to press enter, this is what you have observed.

I would add that information provided above is provided in file readme.txt
included with FPC (not even mentioning the excellent user documentation
;-) ).

Tomas


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