The Dink Network

Reply to Re: New D-Mod: Cursed Blades Part 1: Charlie's Legacy

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
July 25th 2022, 06:56 PM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
"This tells me that in DinkC, there is (in effect) no real stack. They are NOT stack variables, THEY ARE GLOBALS. That is what I understand by the term "pseudo variables".

While that may be the case, that seems to be the only Dink version I've seen that behaviour occur in.

Even in Vanilla 1.08 for windows, and DinkHD, it works in the way I described. This is the way I've always coded.

And I disagree. In fact nothing in the pseudo variable list is a true "global" in the way other globals are declared, they all work in different ways, sure, but they work as described in the list. But even back in the 1.08 days, when an argument was passed to a procedure, that argument value was specific to that procedure. I tested this on many different engines again. That linux 109.6 version is the only one that behaves in that (in my opinion) incorrect way. I'd say the way the other engines do it, that allow you to store more values without having them overwritten seems like the intended purpose anyway(especially since the odd one out of all the engines, is that it doesn't do that) I definitely won't be wanting to re-write several hundred lines of scripting to conform to the one odd engine out of the bunch.

So Freedink 109.6 on Linux is the only one that overrides arguments passed to procedures. I tested that script on Dink Smallwood 1.08, Freedink 108.4, Freedink 109.6(windows), DinkHD. They all make Dink say "1" in that scenario, since that is the 1st argument passed to that procedure. The wording makes sense in the DinkC reference for this as well. For instance under &arg1, It does not say "the last known first argument passed to a procedure" (like it does with pseudo variable &return, which does in fact get overwritten, as it's supposed to, with the last known return value). It simply says "The first argument passed to a procedure.", and all engines besides that one linux version behave that way. I'd be more likey to try and get it working for an older version of FreeDink on Linux that DID behave in the correct way. I think FreeDink 108.4 for Linux, probably. This Linux 109.6 seems to have issues.

Pseudo Variables

Edit: Furthermore, as user "someone" says here, he looked in the original source code every script has it's own &arg1-9 variables, so yes, the Linux version is indeed buggy. It took out this functionality and made them "globals" (they aren't supposed to be). This was all the way back in 2008, as I said, back in the 1.08 days.
'Someones' post on &arg1-9 variables
They are supposed to be able to be different values in different scripts, concurrently.