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

Post bugreports for the Windows version here
Posts: 64
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 
User avatar
Posts: 1565
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke

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 5.73 ― Win 10, 20H2 ― Ryzen 9 3900X ― Radeon RX 5600 XT ITX ― Vivaldi 4.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Post Reply