[fpc-pascal] How to start fp with self-selected *.pas-file

Tomas Hajny XHajT03 at hajny.biz
Tue Apr 28 12:15:29 CEST 2015

On Tue, April 28, 2015 11:20, Sven Barth wrote:
> Am 28.04.2015 08:34 schrieb "Christian Ingo Fahrner" <
> christian-ingo.fahrner at fernuni-hagen.de>:
>> Dear sirs,
>> thank you for the free pascal compiler, I am a student at
> www.fernuni-hagen.de.
>> When starting free pascal compiler, there is a preselected *.pas that
> appears its programcode. As I tried to delete the preselected file, there
> was an error like 'cannot load, file is missing'.
>> How is it possible both to delete the automatical entry of code and to
> select a different, maybe a self-template code?
> Do you mean you started the command-line compiler ("fpc") or the text mode
> IDE ("fp")?

I guess that the e-mail subject combined with the description suggests the
latter (i.e. it is indeed the FP IDE, not the compiler). If this
assumption is correct, the issue may be related to desktop (of the IDE)
saved from some previous session. From this point of view, the possible
answers might be:

1) If you remove file fp.dsk stored either in the directory, from which fp
is started, or in the user home directory (the exact location depends on
the used operating system / platform), or possibly in some system-wide
shared location (again depending on the operating system / platform), the
IDE should not try to load any particular file any longer.

2) Regarding the setup of something else you _want_ to open at start,
there are several options. First, you may simply start the IDE with a
command line parameter specifying the file to open. This may be specified
e.g. in the shortcut / launch object / whatever it is called on your host
platform, or you may use this option together with association of the
respective file type with the IDE and then opening the file automatically
in the IDE. Second, you might open the needed file on your (IDE) desktop,
have the desktop saved and disable the option for automatically saving the
desktop state when exiting the program. That way the IDE always starts
with the same windows open, etc. Third, you might simply start the IDE
without anything open by default and open files or create them based on
the existing or newly created template (File -> New from template).

In order to switch from assumptions to facts, we should preferably know /

1) Which host platform is this (MS Windows, Linux, Mac OS X, etc.)?

2) Is the question related to a new installation, or an existing
installation provided and maintained by someone else (e.g. in the
University lab)?


More information about the fpc-pascal mailing list