• filesize(xx)

    From Tony Master@1:218/530 to All on Thu Nov 3 00:04:30 2016
    so in pascal you can get the number of records by using filesize() but when i try it in mpl its not working. any ideas or work around? in mpl there is sizeof() and filesize() tried what i could think of with no luck.

    .·∙Dream Master∙·.
    °∙·∙° °∙·∙°
    DoRE!ACiDiC!Demonic
    [dreamland.darktech.org]

    --- Mystic BBS v1.12 A31 (Windows)
    * Origin: --[!dreamland BBS dreamland.darktech.org (1:218/530)
  • From Christopher Malo@1:317/2 to Tony Master on Thu Nov 3 04:39:54 2016
    On 11/03/16, Tony Master said the following...

    so in pascal you can get the number of records by using filesize() but when i try it in mpl its not working. any ideas or work around? in mpl there is sizeof() and filesize() tried what i could think of with no
    luck.

    Replied to this a few times but one more!

    Function ReadEntry(FN:String;I:Integer):Boolean
    Var Ret : Boolean = False
    Var Fp : File
    Begin
    fAssign(Fp,JustPath(ProgName)+FN,66)
    fReset(Fp)
    If IoResult = 0 Then Begin
    fSeek(Fp,(I-1)*SizeOf(Entry))
    If Not fEof(Fp) Then Begin
    fRead(Fp,Entry,SizeOf(Entry))
    Ret:=True
    End
    fClose(Fp)
    End
    ReadEntry := Ret
    End

    Function GetEntryCount:Integer
    Var Ret : Integer = 1
    Begin
    While ReadEntry(Ret+1) Do
    Ret:=Ret+1
    GetEntryCount := Ret
    End

    Cheers!
    Pequito

    |08+- |10$s.s$s.s$ |08------------------------------------+
    |08| |10$²"$$$"²$ |15tbbs.homeip.net |08|
    |08| |10 .$$$. winkle |02BB|10S |07tbbs.homeip.net:8080 |08|
    |08+--|10 .$$$$$. |08-------------------------------------+
    |10 $²"~"²$ |07Christopher Malo |15aka |07Pequito!

    --- Mystic BBS v1.12 A31 (Linux)
    * Origin: Twinkle BBS (1:317/2)