Bug with .l PB6 a3 - ASM ????

Just starting out? Need help? Post your questions and find answers here.
drgolf
User
User
Posts: 90
Joined: Tue Mar 03, 2009 3:40 pm
Location: france

Bug with .l PB6 a3 - ASM ????

Post by drgolf »

This code compile with pb 5.73 but not with pb6 a3 -ASM

with fileid.l : error message : le #file n"est pas initialisé
with fileid.i : no error.

with pb6 a3 C backend : compile in both case.

Code: Select all

Define StreamData.EDITSTREAM 
  Define  FileID.l ,file.s
  
  file="put here a valid file name"
  
  FileID = ReadFile(#PB_Any, file) 
  If FileID 
    StreamData\dwCookie = FileID(FileID) 
    StreamData\dwError = #Null 
    CloseFile(FileID) 
  EndIf 
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Bug with .l PB6 a3 - ASM ????

Post by STARGÅTE »

It is no bug in PB. It is a bug in your code.

All Pure Basic Libraries return an Integer (64bit/32bit) as ID. Using a Long is not valid!
It works in pb 5.73 just randomly, because the number was small.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Post Reply