English
Bugs and vermeintliche

Done: PROC / Pointer-Bug in 11.2 yet present

 
- Page 1 -



Uwe
''Pascal''
Niemeier
Hello Roland!

The Error, with the The Adressen of variables through Proc-Aufrufe moved go, is in the actually Version 11.2ß still present

he's itself mere something to hinten verschoben; wants say: exit first ex of/ one conscience Parameterzahl on.

QED:
CompileMarkSeparation
window 500,400

proc Demo-------------------------------------------------------------

    parameters x1&,x2&,x3&,x4&,x5&,x6&--Ohne Parameters klappt es
    endproc---------------------------------------------------------------
    declare Wert&,Test&--bei Weglassen der 2. Deklaration klappt es
    print Addr 1 ,addr(Wert&)
    Demo(1,2,3,4,5,6)
    print Addr 2 ,addr(Wert&)
    wai

of course were itself Perhaps Workarounds for the trouble finden; nevertheless might/ought to it still so not his?

BTW: evident are my OCX-routines therefore still not funktionsfähig

to recollection: Selbige make possible u.A. The Use the Befehlsumfanges all gängigen Scriptsprachen (JS, VBS, VBA, WSH) under XProfan; therefore lying me so much on it. (and because tappt im dunkeln of me are )

hope on (baldige) Help
Pascal
 
04/04/09  
 



 
- Page 1 -



RGH
Hi,

vergiß my Workaround. The problem exit too with Integers on.

I fürchte, the can itself too hardly Change. to Speicherung the variables use I The dynamic Arrays of Delphi. Since there it for each Variablentyp one aray. becomes now a new Variable declared becomes The Size the Arrays circa 1 ertweitert (Delphi: SetLength(IntVar, IntNr + 1)) and then name and worth into aray written. becomes the aray now larger, remaining it means not from, that sometime the Speicherbereich for the aray on another place moved go must, where even this additional Space is. How the Delphi or windows intern handling, white I naturally not.

to the Dynamisierung trod this trouble even therefore not, there there the memory for all possible variables same To Programmbeginn reserved watts.

that is in the actually practice: an Variablenadresse is At least as long validly, To a further Variable this Type declared becomes (through Declare, Var or Parameters).

I fürchte, on this behaviour can I for the time being too nothing Change. (it be because, someone has a zündende idea.)

Greeting
Roland

Nachtrag: can You do not reaches use? The address one Bereiches ought to not move, there here in the suitable aray Yes only one Zeiger on the area standing. but not of/ one Lonint-variables So one 4 byte great area.
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
04/04/09  
 




RGH
the works by me:
CompileMarkSeparation
window 500,400

proc Demo-------------------------------------------------------------

    parameters x1#, x2#, x3#,x4#, x5#, x6#
    print x1#, x2#
    endproc---------------------------------------------------------------
    declare wert#, test#
    dim wert#, 2
    dim test#, 2
    print Addr 1 ,addr(Wert#)
    Demo(wert#,wert#,wert#,wert#,wert#,wert#)
    print Addr 2 ,addr(Wert#)
    
put
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
04/04/09  
 



@Pascal: i see you already but the meets hold only on (real) variables To The even not gemanaged are.

@RGH: even if You, the time to and behind of/ one grösseren application einbaust in the some happens?

I have no zündende idea. (though I Schonmal thought a had to have, time drüber grübeln...)

Ah, I know again How... time zurechtschreiben - is ne Precompiler-Solution with the disadvantage the for grabbed the values hold ne Sonderfunktion necessary is. (Umgekehrter disadvantage)
 
04/04/09  
 




RGH
iF
@RGH: even if You, the time to and behind of/ one grösseren application einbaust in the some happens?


Yes, The reaches stay on their Space! (naturally only up to one renewed DIM. ;) )
otherwise would tappt im dunkeln Yes not at all functions.
The suitable Umbau ought to itself for Pascal in border hold.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
04/04/09  
 



Nachtrag:

on my example, would I instead of for reguläre Longs:
CompileMarkSeparation
use.

might XProfan with Dispose with a GlobalFree react?
 
04/04/09  
 




Uwe
''Pascal''
Niemeier
Hi people!

Roland
that is in the actually practice: an Variablenadresse is At least as long validly, To a further Variable this Type declared becomes (through Declare, Var or Parameters).


have so did i straight fixes. so is @Addr() to a Real unsure thing become

the Übergeben one variables-Pointers serves Yes in my case only moreover, a Proc More as whom direct  Return Value To inquire (additional Rückgaben get even by Pointer into suitable variables written).
nevertheless: These Possibility ought to former or later again in anybody shape available stand.

Roland
The suitable Umbau ought to itself for Pascal in border hold.


is correct!
so far I my own code durchschaue, served the whole only the comfort the Anwenders, because the so its own variables use could (otherwise is the idea of iF a alternative,
though a& = a# then indeed klappen should).

instead ought to itself a system-Variable install let, its Content to Calling the betreffenden function even umkopiert go must... or something like in the manner.

will be time see, what itself make can...

SeeYou
Pascal
 
04/04/09  
 




Sebastian
König
So I find, Pascal has right. The with Addr() ermittelte address ought to itself as long as The Variable validly is (with global variables means during the whole Laufzeit) not Change can. Dass the in the doing To Problemen lead can (and furthermore To very low-down, so a Error To lokalisieren is Yes everything else as simply...), show Yes Pascals OCX-Codes.

If the cause in the Using the dynamic Arrays lying, is the unschöne consequence well, that itself these to Speicherung the variables crept not suit. my suggestion is therefore, The management umzustellen, what naturally well not so short-term possible is... but at least for next Version Perhaps already.

My guess would be, that The Arrays intern a manner vector-class are (possibly standing the somewhere in the Delphi-Documentation). it should then still possible his, The dynamic Speicherverwaltung self To implementieren and thereby on The of Delphi provided Datenstruktur-classes zurückzugreifen. so ließe itself with Perhaps not at all too plenty work the trouble to fix.

MfG

Sebastian

P.s.: another idea: at least for globale variables could one Perhaps still short-term something arrange, because one tappt im dunkeln at Compile counts and solid memory in passender Size provides. i know naturally not, How simply a such Sonderbehandlung incorporate would...
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
04/04/09  
 



 
- Page 2 -



RGH
Hello Pascal and Sebastian,

short-term, means for version 11.2, goes presumably quite nothing. long-term should I then some adjust, because I about into Arrays not The values self, separate, How with whom reaches, only Pointer on the jeweiligen Speicherplatz unterbringe. this is naturally again something umfangreicheres undertaking. a disadvantage would like I do not keep secret: The Access to variables becomes therefore naturally a little bit slower. i'll But for version 12 in the eye keep.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
04/04/09  
 




RGH
Hehe, and The speedy there still a Solution:

for Integer, LongInt and Float lay I The Arrays To Programmbeginn on the worth solid, the To XProfan 10-times eh The maximum was: 2000. first if The 2001. Variable one Type declariert becomes, becomes the aray dynamic extended.
there then never someone these border access has, might the voerst too you, Pascal, suffice.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
04/04/09  
 




Frank
Abbing
the hears itself still very sensible on!
 
04/04/09  
 



@Roland: I knows not very How You count but I be uncertain these boundary in manchen play not To achieve and would (if I could) well from Sicherheitsgründen The number higher take on, even if it More memory in claim takes. real variables instead of Arrays make sometimes from Performancegründen sense as well as the distribute on many small functions with against lauter variables.
 
04/05/09  
 




Uwe
''Pascal''
Niemeier
Hi people!

i think, one could with the instabilen Pointern leben; if to the trouble first knows, are Workarounds (reaches use) relatively simply.
only in the of me angesprochenen drop (@Addr(Variable&) on PROC transfer, circa directly in The Variable To write) ought to long-term a elegantere Solution found go, because these engineering z.B. with Interfaces Standart is.

what ocx concerns: the runs now
After replacement all affected Pointer through reaches and of/ one small Korrektur concerning the PROC-Parameterstacks (with the it ditto a Difference between 10.x and 11.x gives) I will in Kürze a properly angepaßte Version post.


and thanks on Roland, the itself short-term this thing adopted has, though it Yes objectively only a small part the users concerns (even if this straight The Grundlagenforscher are, and around the would it still pity been )

SeeYou
Pascal
 
04/05/09  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.572 Views

Untitledvor 0 min.
H.Brill09/18/24
Member 166302405/07/19
Georg Teles10/14/14
iF01/19/11

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie