Lazarus
Home
Forum
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
Troubles assigning a file
Downloads
Daily Snapshots
FAQ
Wiki
Bugtracker
IRC channel
Developer Blog
Follow us on Twitter
Mailing List
Free pascal
Other languages
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
About donations (wiki)
Bookstore
Lazarus, the complete guide
Search
Advanced search
« previous
next »
Print
Pages: [
1
]
Author
Topic: Troubles assigning a file (Read 2919 times)
Dhouard
Guest
Troubles assigning a file
«
on:
December 10, 2003, 10:19:45 am »
I have a very strange problem when compiling a little program from inside lazarus. whenever I try to assign a name to a file using the command "assign" I have an "wrong amount of parameters especified" error.
I try to compile a programme like this on fpc (console) y worked. There was no problem, but the same code inside lazarus gives the error.
Here's the code.
---
procedure TForm1.Button4Click(Sender: TObject);
Var
F: file;
begin
Assign(F, 'pepe.txt');
end;
---
what can it be happening?
Thanks.
Dhouard.
Logged
vrs
New member
Posts: 25
Troubles assigning a file
«
Reply #1 on:
December 10, 2003, 10:25:53 am »
The TForm class is derived from TPersistant, which has an assign method. The compiler thinks you want to use that mehod.
To use the assign procedure to assign a file add the unit name where it can be found.
System.Assign(F,'pepe.txt') will do the trick.
Vincent.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Using the Lazarus IDE
»
General
»
Troubles assigning a file
Recent
ListBox Filter
by
lainz
[
Today
at 05:00:07 am]
BGRAControls
by
lainz
[
Today
at 03:10:41 am]
FPCUp FPC/Lazarus SVN ins...
by
lainz
[
Today
at 03:09:38 am]
What is this Delphi Heade...
by
DirkS
[
Today
at 12:11:59 am]
Build of SQLite3 for WINC...
by
bambamns
[
Today
at 12:09:01 am]
Lazarus crashes after “Re...
by
and4977
[May 20, 2012, 11:26:31 pm]
Scrambled dragimage
by
Ocye
[May 20, 2012, 10:30:19 pm]
Transparency with Qt on D...
by
Ocye
[May 20, 2012, 08:14:43 pm]
DragImage adds as new win...
by
Ocye
[May 20, 2012, 08:05:24 pm]
TFrame size
by
iru
[May 20, 2012, 07:03:22 pm]