Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
[UNSOLVED] Assign ficher pascal !!
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Extended Module Player
by
Gigatron
[
Today
at 05:32:06 pm]
CONCAT formula
by
wp
[
Today
at 05:27:43 pm]
could Ardour's YTK be use...
by
robert rozee
[
Today
at 05:27:15 pm]
CryptoLib4Pascal
by
jamie
[
Today
at 05:25:35 pm]
[AGGPas] Difference betwe...
by
Roland57
[
Today
at 04:36:02 pm]
GTK3 : Icons have borders...
by
cdbc
[
Today
at 04:05:27 pm]
Getting results from sql ...
by
CraigC
[
Today
at 03:44:57 pm]
Hello! Anything new?
by
marcov
[
Today
at 03:29:02 pm]
Questions about TFuncSeri...
by
wp
[
Today
at 03:05:31 pm]
declaring Array
by
Thaddy
[
Today
at 01:24:11 pm]
Problem with drawing orde...
by
wp
[
Today
at 11:32:56 am]
TChart: Wrong default val...
by
wp
[
Today
at 11:30:54 am]
Text Fill (Memo)
by
paweld
[
Today
at 09:09:13 am]
Qt6/Wayland clipboard: pa...
by
AlexTP
[
Today
at 08:56:58 am]
Pocketbase
by
PierceNg
[
Today
at 06:29:04 am]
ADUG Symposium 2026
by
Mathias Burbach
[
Today
at 04:45:57 am]
Any way to "embed" Window...
by
jamie
[
Today
at 12:55:37 am]
DataPort StopBits and Flo...
by
Thaddy
[March 13, 2026, 02:14:16 pm]
Lazarus Bugfix Release 4....
by
JuhaManninen
[March 13, 2026, 10:05:03 am]
88 year D. Knuth changes ...
by
Thaddy
[March 13, 2026, 07:31:38 am]
interface and GUID someth...
by
egsuh
[March 13, 2026, 03:31:00 am]
CADSys4 3D.
by
maurog
[March 13, 2026, 01:00:05 am]
UOS - pre-compiled librar...
by
Fred vS
[March 13, 2026, 12:34:06 am]
Pipewire API
by
Fred vS
[March 12, 2026, 10:11:02 pm]
TSplitter color property ...
by
valdir.marcos
[March 12, 2026, 09:20:11 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [UNSOLVED] Assign ficher pascal !! (Read 2387 times)
whitehat
Jr. Member
Posts: 93
[UNSOLVED] Assign ficher pascal !!
«
on:
November 23, 2016, 12:44:47 am »
when i execute my program there is a mistake with assign here is the error message (es.lpr(16,9) Error: Call by var for arg no. 1 has to match exactly: Got "tfiche" expected "Text")
Code: Pascal
[Select]
[+]
[-]
program
es
;
uses
wincrt
;
type
e
=
record
numv
,
np
:
integer
;
ld
,
la
,
nv
:
string
;
end
;
tfiche
=
array
[
1
..
20
]
of
e
;
var
f
:
tfiche
;
procedure
remplire
(
var
f
:
tfiche
)
;
var
v
:
tfiche
;
begin
Assign
(
f
,
'E:\vol.dat'
)
;
open
(
f
)
;
with
v
do
writeln
(
'saisir numero du vom'
)
;
lire
(
numv
)
;
writeln
(
'saisir numero de passagé'
)
;
lire
(
np
)
;
writeln
(
'saisir lieu d'
'ariver'
)
;
lire
(
la
)
;
writeln
(
'saisie lieu de deppart'
)
;
lire
(
ld
)
;
repeat
writeln
(
'saisir l nember de voyage'
)
;
lire
(
nv
)
;
until
nv
in
[
'a'
..
'd'
)
;
end
;
Logged
howardpc
Hero Member
Posts: 4144
Re: [UNSOLVED] Assign ficher pascal !!
«
Reply #1 on:
November 23, 2016, 01:38:23 am »
You're perhaps looking for a program like this:
Code: Pascal
[Select]
[+]
[-]
program
es
;
type
TRec
=
record
numv
,
np
:
integer
;
ld
,
la
:
shortstring
;
nv
:
Char
;
end
;
TFile
=
file
of
TRec
;
procedure
FillRec
(
out aRec
:
TRec
)
;
begin
aRec
:
=
default
(
TRec
)
;
WriteLn
(
'saisir numero du vom'
)
;
ReadLn
(
aRec
.
numv
)
;
WriteLn
(
'saisir numero de passagé'
)
;
ReadLn
(
aRec
.
np
)
;
WriteLn
(
'saisir lieu d'
'ariver'
)
;
ReadLn
(
aRec
.
la
)
;
WriteLn
(
'saisie lieu de deppart'
)
;
ReadLn
(
aRec
.
ld
)
;
repeat
WriteLn
(
'saisir l nember de voyage'
)
;
Read
(
aRec
.
nv
)
;
until
(
aRec
.
nv
in
[
'a'
..
'd'
]
)
;
end
;
var
f
:
TFile
;
r
:
TRec
;
c
:
string
;
begin
AssignFile
(
f
,
'E:\vol.dat'
)
;
Rewrite
(
f
)
;
repeat
FillRec
(
r
)
;
Write
(
f
,
r
)
;
WriteLn
(
)
;
WriteLn
(
'Add another record (Y/N)?'
)
;
ReadLn
(
c
)
;
until
(
c
[
1
]
in
[
'N'
,
'n'
]
)
;
CloseFile
(
f
)
;
end
.
Logged
marcov
Administrator
Hero Member
Posts: 12718
FPC developer.
Re: [UNSOLVED] Assign ficher pascal !!
«
Reply #2 on:
November 23, 2016, 10:30:18 am »
tfiche is not a filetype. TFile as Howardpc defines is is a filetype.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
[UNSOLVED] Assign ficher pascal !!
TinyPortal
© 2005-2018