sous OS X avec PureBasic 5.6.1 ce code fonctionne dans une procédure :
Code : Tout sélectionner
If ReadFile(0, FileAndPathName.s)
TailleInit.l = Lof(0)
EndIf
Code : Tout sélectionner
FileID.l = ReadFile(#PB_Any, FileAndPathName.s)
Debug FileID.l
If FileID.l
TailleInit.l = Lof(FileID.l) ;ligne générant l'erreur
EndIf
[15:53:26] Waiting for executable to start...
[15:53:26] Executable type: MacOSX - x64 (64bit, Unicode)
[15:53:26] Executable started.
[15:55:25] [ERROR] The specified #File is not initialised.
[15:55:46] The Program was killed.
Merci de vos lumières. Cordialement. Gilles