EOF method and how to use it

shafeaashafeaa Member Posts: 54
hi ever one

where can i find EOF method and how can i use it


thanks

Comments

  • bostjanlbostjanl Member Posts: 107
    shafeaa wrote:
    hi ever one

    where can i find EOF method and how can i use it


    thanks

    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
  • shafeaashafeaa Member Posts: 54
    edited 2005-03-21
    hi bostjanl
    There is no such metod. You have to use NEXT metod
    this is weird :!: :!: :!: :!:
    ok but there is somthing like this in the development exam?????????

    i try to write somthing like this
    //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
    
    it is possible that the previous code give true or false (boolean)?????

    and thanks
  • bostjanlbostjanl Member Posts: 107
    shafeaa wrote:
    hi bostjanl

    ok but how can i use it?????????

    i try to write somthing like this
    //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.

    f

    Data type: file

    Use this variable to refer to the file.

    Variable

    Data type: any

    The destination variable.

    ======================================

  • GoMaDGoMaD Member Posts: 313
    wow, no need to shout !

    :-$
    Now, let's see what we can see.
    ...
    Everybody on-line.
    ...
    Looking good!
  • shafeaashafeaa Member Posts: 54


    There is no such metod. You have to use NEXT metod



    this is weird :!: :!: :!: :!:
    there is somthing like this in the development exam?????????
  • bostjanlbostjanl Member Posts: 107
    GoMaD wrote:
    wow, no need to shout !

    :-$

    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 :D

    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
  • GoMaDGoMaD Member Posts: 313
    point taken, monday mornings are a pain in the $ss

    Have a nice one!
    Now, let's see what we can see.
    ...
    Everybody on-line.
    ...
    Looking good!
  • bostjanlbostjanl Member Posts: 107
    shafeaa wrote:


    There is no such metod. You have to use NEXT metod



    this is weird :!: :!: :!: :!:
    there is somthing like this in the development exam?????????

    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
  • shafeaashafeaa Member Posts: 54

    There is no such metod. You have to use NEXT metod
    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

    i get it in the first time but u read my post before i edit it look again
    this is weird
    there is somthing like this in the development exam?????????
    I have to get another cup of coffe. Those monday mornings are killing me

    me too couse i faill in the exam yasterday
    and u know what
    i get 69%

    reQuired score 70%


    this exam killing my
    ](*,) ](*,) ](*,) ](*,) ](*,) ](*,) ](*,)
  • shafeaashafeaa Member Posts: 54
    shafeaa wrote:

    There is no such metod. You have to use NEXT metod
    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

    i get it in the first time but u read my post before i edit it look again
    this is weird
    there is somthing like this in the development exam?????????
    I have to get another cup of coffe. Those monday mornings are killing me

    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
  • GoMaDGoMaD Member Posts: 313
    The main clue to getting away with Navision, is to let go of almost all the TransactSQL and VB syntaxes you know!

    I know it's hard but it's the only way

    :-k
    Now, let's see what we can see.
    ...
    Everybody on-line.
    ...
    Looking good!
  • FeldballeFeldballe Member Posts: 26
    //xfile is file variable
    xfile.EOF

    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.
  • MRQMRQ Member Posts: 73
    hi
    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 :mrgreen: but i think
    //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 ](*,) ](*,) ](*,)
  • BackiBacki Member Posts: 5
    MRQ wrote:
    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".
    Yours
    Stephan
Sign In or Register to comment.