Normale Version: Use of the Null() function, also FPU requirements
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2
Hi all,
I've recently updated AmiBlitz3 to the latest version on Sourceforge (3.6.1). Since I updated I haven't been able to use the Null() function - the compiler gives me a garbage / unwanted characters at end of line error. Is there a simple alternative for this or is it just a case of assigning a string and using the address from this? So

MUISet obj,property,Null("MyTitle "+myvar$)

is now

mydummy$="MyTitle "+myvar$
MUISet obj,property,&myvar$

Also, with the note that was included in the archive I understand that an FPU is a requirement. I know certain commands used the FPU but I was able to build executables with AmiBlitz 3.5 that run fine without an FPU by just avoiding particular commands that caused crashes without an FPU (such as val()). Has this changed, or are my 3.5 executables possibly faulty too even though there's no sign of any crashes?

Yes we are changed this, use Str2Adr instead
We changed the orginal NULL() to Str2Adr() in Revision R487 to make the command (function) usable again because the Compiler use NULL for 0. To use it you need the compiler and Deflibs form R487 or newer and a rebuild of the Instuction index ( over the PEd menupoint Help=>Instruction index rebuild). If the Source you used was saved in tokenized form with .bb or .bb2 ending then the Source use automaticly the new name Str2Adr(). If it was save in text form with the ending .ab2 or .ab3 you have to convert it manualy by replaceing "NULL(" with "Str2Adr(".

The problem with the FPU use is bigger then some commands like Val() it is use for Function Returnvalues to and more. I can't 100% say with command are effected because it is not clear for me the way i can read the compiler sourcecode.
That's great, thanks for the information. Str2Adr will work fine, slightly easier to search and replace that in my sources Smile

As for the FPU thing, I understand that at least it hasn't changed since 2.4, so I'll put a warning in my readmes about it. But code that has worked for years without an FPU should still work with the latest compiler I take it.

Thanks again!
Sorry to bring this up again. At the time of that post I thought I tried Str2Adr() but now Str2Adr is not recognised by AmiBlitz, nor is StrToAdr. I haven't updated or changed anything, but just to check in case something was wrong with my setup, I downloaded AmiBlitz 3.6.1 from Sourceforge and tried that. It doesn't recognise Str2Adr or StrToAdr either. A text search of all files doesn't find it either.

Am I going crazy here? Did I miss something? I think I have the updated versions of the libraries because the fresh 3.6.1 did not work, and the Null() function doesn't work like it did in older versions.

=> Time for Distro Update...
Ah, I see what's wrong so. I downloaded the changed files in the ElmoreSysLib update, rebuilt the instruction index and it's working. Thanks for the hint Smile
Sorry Deadalus i can't answer you befor, the dispor 3.6.1 are old and the change of NULL => Str2Adr are not in there. Best is you use always the latest checkout of the SVN to have all the latest changes.
I updated the ElmoreSysLib and also the DefLibs to fix the Longread to $14 by this i renamed the function 'StrToAdr' to the better name 'GetGlobalStrAddr' that was suggested by 'Der Wanderer'.

Also Bernd write in a other post that this function is not needed with Blitzbasic 2 and newer because it use always null-terminated strings so you can use '&' instead for example 'x=&String$'.
tomsmart1 schrieb:Also Bernd write in a other post that this function is not needed with Blitzbasic 2 and newer because it use always null-terminated strings so you can use '&' instead for example 'x=&String$'.

That's true, and I had worked around it using that method before, but I was using the old Null() function as a tidy method of combining strings as a parameter. 'x=&String1$+String2$' doesn't work for example, so you need x$=String1$+String2$:x=&x$ instead.

Thanks for your work on this!
Seiten: 1 2