English
Forum

bow: var and declare with proc in proc

 

Dieter
Zornow
XPSE reports with folgendem code a Error, Profan bleats not + Edit
neither, the code runs too correct only XPSE reports "undeclariert a&".

I take still heavy on, what indeed The practice beweißt, that in a
Unterproc of/ one procedure The variables the procedure there famous are.

who power here whom Error Profan and the + Edit because To tolerant or
XPSE
CompileMarkSeparation
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
12/06/08  
 



Jupp, one Bug in one feature. bow exit with Declare and Var on.

XPSE can The "Sichtbarkeit" of variables with Funktionsverschachtelungen Verify and hierauf differences utilize.

the XPSE goes it Yes even therefore, less lots Anforderungen To settle, there "lose" Anforderungen Yes already through XProfan self abgedeckt go.

so How this code
CompileMarkSeparation
Gemerkt/Separiert von http://xprofan.com/thread.core?t=7218

Proc Dialog

    test{

        print aqe+1

    }

    long aqe=10
    test()

endproc

cls
dialog()
12/06/08  
 




Dieter
Zornow
The "losen" Anforderungen are but important, I z.B not
XPSE - Syntax program and not The things How on Header-Files
dispense use. i will aware, that my Codes under XProfan run
stay. I nemutze XPSE not more than time to Codeüberprüfung
and then is it Yes pointless if I because of whom "losen" things noerror on
should.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
12/06/08  
 



In this case there More correctives, as z.B. "nur" {$noerr}.

in example could The variables-Deklaration over The Function-Deklaration settle, or with {$pushkeyword a&} works.

On each drop is But so, that one "xpse-konformer" code, too nachvollziehbar "valide" his should, if one nunmal not unterstellt, the one loser Interpreter this understand.

The Konstrukt
CompileMarkSeparation likes of XProfan correctly carryed out go, More but neither.

XPSEs Vorgaben orientieren itself nunmal not on it, whether XProfan it well possible correctly "ausführt", separate on it, that XProfan it definitiv correctly executing.

These "erkaufte" safety is naturally not for each interestingly, time foreseen of it, that one "Bug" this from you beschriebenen Error causes.
 
12/06/08  
 




RGH
Hi,

Dieters code won't only correctly carryed out, he's too definitiv and sure correctly!
If XPSE another opinion is, then is XPSE not 100%ig compatible To XProfan.

The Sichtbarkeit of variables becomes in unterschiedlichen Languages now time different gehandhabt. XProfan holds it with the Sichtbarkeit of variables very like Pascal (-> TuboPascal -> Delphi). an "oberhalb" of/ one procedure defined Variable is inside the procedure famous, unless, its inside the procedure before a gleichname (local) Variable declared been. (Hierbei counts the Parameters too as deklaration of variables.)
The Variable a& in Dieters example is therefore in the PROC show famous, there tappt im dunkeln oberhalb this declared watts. the would in Pascal and its direct Abkömmlingen To there To Delphi just as functions.
In C which go after, wozu I now time very largely too C++ and Java count) would it so not functions.
(and in PowerBasic was is yet quite different, there had to one go wrong variables with "shared" into procedure take.)

on this place one Tipp for users of Profan2CPP: there here C++-code created becomes, ought to one in this drop derartige Konstrukte though avoid and on nested Procedures dispense.

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
12/06/08  
 



RGH
Hi,

Dieters code won't only correctly carryed out, he's too definitiv and sure correctly! If XPSE another opinion is, then is XPSE not 100%ig compatible To XProfan.


100%ig compatible To XProfan can XPSE not his, there XPSE plenty More over the code grübelt, as it for XProfan necessary is.
 
12/06/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.617 Views

Untitledvor 0 min.
p.specht01/11/18
E.T.01/08/12
Dieter Zornow05/28/11

Themeninformationen

this Topic has 3 subscriber:

iF (3x)
Dieter Zornow (2x)
RGH (1x)


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