I asume you mean table.EOF. There is no such metod. You have to use NEXT metod, which returns the number of record skiped. So when is no more records it returns 0.
The same thing is with file. All metods/functions retuns the number od bytes/characters read.
//xfile is file variable
xfile.EOF
or
//jnlline is record variable
jnlline.EOF
but the this error rise
you have specified an unknown variable
eof
other Question please
if i use Eof like this
if jnlline.EOF then
[quote]
it is possible that the previous code give true or false (boolean)?????
and thanks[/quote]
THERE IS NO EOF METOD IN NAVISON!
For tables use NEXT
table.SETRANGE(...
table.FIND('-');
REPEAT
// do something with table
UNTIL tabel.NEXT = 0; // move to next until EOF
And check C/SIDE help for more details on NEXT
======================================
NEXT
Use this function to step through a specified number of records and retrieve a record.
Steps := Record.NEXT([Steps])
Steps
Data type: integer
This function returns the number of records inspected which meet the criteria of any filters and the current key. This value can be less than Steps, depending on the number of records in the table. If the table is empty, the system returns zero and does not change Record.
Record
Data type: record
The record from which the system should begin the search.
Steps
Data type: integer
Used to define the direction of the search and how many records to step over.
======================================
For files check help for READ
======================================
f.READ
Use this function to read from an ASCII or binary file.
[Read] := f.READ(Variable)
Read
Data type: integer
This optional return value tells you the number of bytes read.
It is true that it seems odd that Navision is not using EOF in relation to files. But if you are using a file-variable you can test for the position in any file by using a combination of file.len, file.pos and file.read, where file denominates a file-variable.
File.len will return the length of any givin file in bytes (integer). File.pos will give you the current position (integer) and file.read will return how many bytes read (also integer). So if you know how long the file is, then it should be possible to get a "sort of" EOF by comparing file.read with file.len.
Q7)Xfile.EoF how can u represent it in another way
1.xfile.pos
2.xfile.read
3.xfile.len
4.file.read(file.pos)= file.len
5.file.read= file.len
Hi it is Answer 4
Example:
WHILE f.POS < f.LEN DO BEGIN
f.READ(Zeile);
...
END;
POS is indicating the Position in the File
LEN is the File Size.
The While Statement above works as long, pos is smaller then len.
If there are Equal you are at "EOF".
Comments
I asume you mean table.EOF. There is no such metod. You have to use NEXT metod, which returns the number of record skiped. So when is no more records it returns 0.
The same thing is with file. All metods/functions retuns the number od bytes/characters read.
regards
BostjanL
ok but there is somthing like this in the development exam?????????
i try to write somthing like this but the this error rise other Question please
if i use Eof like this
THERE IS NO EOF METOD IN NAVISON!
For tables use NEXT
table.SETRANGE(...
table.FIND('-');
REPEAT
// do something with table
UNTIL tabel.NEXT = 0; // move to next until EOF
And check C/SIDE help for more details on NEXT
======================================
NEXT
Use this function to step through a specified number of records and retrieve a record.
Steps := Record.NEXT([Steps])
Steps
Data type: integer
This function returns the number of records inspected which meet the criteria of any filters and the current key. This value can be less than Steps, depending on the number of records in the table. If the table is empty, the system returns zero and does not change Record.
Record
Data type: record
The record from which the system should begin the search.
Steps
Data type: integer
Used to define the direction of the search and how many records to step over.
======================================
For files check help for READ
======================================
f.READ
Use this function to read from an ASCII or binary file.
[Read] := f.READ(Variable)
Read
Data type: integer
This optional return value tells you the number of bytes read.
f
Data type: file
Use this variable to refer to the file.
Variable
Data type: any
The destination variable.
======================================
:-$
...
Everybody on-line.
...
Looking good!
this is weird :!: :!: :!: :!:
there is somthing like this in the development exam?????????
I wasn't shouting,..
I wrote in my first post, there there is no EOF and that he should use NEXT.
But since he didn't get it, I just wrote it again. A bit louder
It wasn't ment to be so loud. :oops:
I have to get another cup of coffe. Those monday mornings are killing me :evil:
BostjanL
Have a nice one!
...
Everybody on-line.
...
Looking good!
Hi!
Weird? [-X
This is BASIC of table/record and file access. ](*,)
As I remembe there is a question in programing and/or develompnet exam about this.
regards
bostjanl
i get it in the first time but u read my post before i edit it look again
me too couse i faill in the exam yasterday
and u know what
i get 69%
reQuired score 70%
this exam killing my
](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
i am sorry if i make u angry
thanks
I know it's hard but it's the only way
:-k
...
Everybody on-line.
...
Looking good!
It is true that it seems odd that Navision is not using EOF in relation to files. But if you are using a file-variable you can test for the position in any file by using a combination of file.len, file.pos and file.read, where file denominates a file-variable.
File.len will return the length of any givin file in bytes (integer). File.pos will give you the current position (integer) and file.read will return how many bytes read (also integer). So if you know how long the file is, then it should be possible to get a "sort of" EOF by comparing file.read with file.len.
i cant remember this Quastion literally but i think i can help u to write it
again.
in fact there is 2 quastion in the development Exam about EoF.
ok lets see :twisted:
//i think this is the secound Quastion about EoF
//also i cant remember the answers literally
//wecan do it
Q7)Xfile.EoF how can u represent it in another way
(chose to answers) :?: :?: :?:
1.xfile.pos
2.xfile.read
3.xfile.len
4.file.read(file.pos)= file.len
5.file.read= file.len
// i dont remember if thier another answers so if u know anther way to represent Xfile.EoF even if it is not in the previous answers ](*,) ](*,) ](*,)
Hi it is Answer 4
Example: POS is indicating the Position in the File
LEN is the File Size.
The While Statement above works as long, pos is smaller then len.
If there are Equal you are at "EOF".
Stephan