ScriptVM, a script language
-
- Enthusiast
- Posts: 103
- Joined: Fri Apr 25, 2003 4:00 pm
- Location: France
Answer:
Your procedure is declare as returning a byte by using a .b
Then if you whant to return an adress that is what * means,
you must declare your procedure as proc.l because an adress is a long var.
That's all, i think.
Dominique.
Then if you whant to return an adress that is what * means,
you must declare your procedure as proc.l because an adress is a long var.
That's all, i think.
Dominique.
Dominique
Windows 10 64bits. Pure basic 32bits
Windows 10 64bits. Pure basic 32bits
Code: Select all
Procedure.b FPeekB(Address.l)
*PtrB.BYTE=Address.l
ProcedureReturn *PtrB\b
EndProcedure
It also crashes on ProcedureReturn if you make:
Code: Select all
Procedure.b FPeekB(Address.l)
*PtrB.BYTE=PeekB(Address.l)
ProcedureReturn *PtrB\b
EndProcedure
That code is not compatible with the new version of PureBasic. The new version of PureBasic broke the #1 rule of developing a programming language, and that is do not make changes to the language that will break your user's existing code.This code is from scripvm.pb and it works with 3.81.
I have only been using PB since Christmas and just recently started porting my C++ Builder projects over to PB so the new changes are not a big deal to me, but I imagine for those who have been using PB a lot longer, it is a big deal, not to mention all the code over at PureArea that has now become "broken".

Yeah,Brice Manuel wrote:That code is not compatible with the new version of PureBasic. The new version of PureBasic broke the #1 rule of developing a programming language, and that is do not make changes to the language that will break your user's existing code.This code is from scripvm.pb and it works with 3.81.
I have only been using PB since Christmas and just recently started porting my C++ Builder projects over to PB so the new changes are not a big deal to me, but I imagine for those who have been using PB a lot longer, it is a big deal, not to mention all the code over at PureArea that has now become "broken".
but do you know what the worst part is

Nobody of THE MAKERS tells you WHY it is "broken" 8O
I have to admit this is making me reevaluate using PB. If in the few months I have been using it, they are already changing things and breaking existing code, I am not sure I am willing to trust that four more months into my project, I will not have to be doing rewrites to fix more code that has become obsolete overnight.Nobody of THE MAKERS tells you WHY it is "broken"
I see it this way (as I've said before):
If it is critical that your code don't break, then use PB v.3.81.. there's nothing wrong with this version..
However; If you don't mind changing a couple of lines in your program, *or* if you start a new project, then you should use the latest version, v. 3.90...
This new version has introduced some features that needed a lot of rewriting of the core, and at some point, something "had" to be broken.
Still, I think it is for the better, and will in the future make PB more great than it already is..
note: above is my 2 cents..
If it is critical that your code don't break, then use PB v.3.81.. there's nothing wrong with this version..
However; If you don't mind changing a couple of lines in your program, *or* if you start a new project, then you should use the latest version, v. 3.90...
This new version has introduced some features that needed a lot of rewriting of the core, and at some point, something "had" to be broken.
Still, I think it is for the better, and will in the future make PB more great than it already is..
note: above is my 2 cents..

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
LarsG is right.
I reckon this is the best time for PB to have other radical changes done, rather than down the track when everyone is settled. If noses are going to get out of joint, why have it happen twice?
Sometimes products may need to break, to move on. Or they stagnate.
Perhaps as a comparision, think v3.8 - 3.9 and VB - VB.net
I reckon this is the best time for PB to have other radical changes done, rather than down the track when everyone is settled. If noses are going to get out of joint, why have it happen twice?
Sometimes products may need to break, to move on. Or they stagnate.
Perhaps as a comparision, think v3.8 - 3.9 and VB - VB.net
No, this thing is not common to every PB update. We try to avaoid it
wherever possible.
We don't breake code for fun, it was really neccesary this time.
But to be honest, you will have to expect some more of these things for
the v4.0 release.
This is because the goal is, to change everything that HAS to be changed
till then, so that after 4.0, this kind of thing doesn't need to happen again.
We of course try to keep it to a minimum, but some changes might be
neccesary.
Timo
wherever possible.
We don't breake code for fun, it was really neccesary this time.
But to be honest, you will have to expect some more of these things for
the v4.0 release.
This is because the goal is, to change everything that HAS to be changed
till then, so that after 4.0, this kind of thing doesn't need to happen again.
We of course try to keep it to a minimum, but some changes might be
neccesary.
Timo
quidquid Latine dictum sit altum videtur
That is reassuring to us newcomersWell, i have been using pb for about 8 months, and i think this is the first time it happens.

Sounds like 4.0 is going to bring some awesome new stuff 8Out to be honest, you will have to expect some more of these things for
the v4.0 release.
This is because the goal is, to change everything that HAS to be changed
till then, so that after 4.0, this kind of thing doesn't need to happen again.
Fr34k: you're making me drool just thinking of what 4.0 will introduce.. (read: break code for better features
)

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
if v4 contains all my wishlist items you're free to break more, just not my fingers...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )