English
Forum

Done: aray - Deklaration

 

Stephan
Sonneborn
Hello iF,
I Have there time ne question:
In my Program have I a Start-procedure, in the some values a INI-File read and some global variables values allocated go.
among other things finds itself the entry
CompileMarkSeparation
Max_Punkte%  = VAL(READINI$(INIFile$, OPTIONS, MaxShapePoints))
>

The Variable is self-evident global declared.

In different Procedures becomes the globale area
CompileMarkSeparation
Data![x%,y%]
>
ausgewertet, the before not declared watts.
in the further Programmverlauf becomes first of all The Start-procedure called and the variables
CompileMarkSeparation
Max_Punkte%
>
one worth allocated. thereafter comes on the Hauptprogrammebene The Variablendeklaration
CompileMarkSeparation
DECLARE Data![Max_Punkte%,5]
>
and the Procedures, The the aray treat, go called.
The Interpreter has no trouble so, the XPSE however already, because the bleats, The Variable Data! be not declared.
Why?

there the whole Yes quite umständlich To explain is, here example:
CompileMarkSeparation
 {$cleq}
DECLARE Max_Punkte%

PROC Start

    Max_Punkte% = 5

ENDPROC

PROC Werte

    Data![1,1] = 123.456

ENDPROC

CLS
Start
DECLARE Data![Max_Punkte%,2]
Werte
PRINT Data![1,1]
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
03/23/09  
 



make a long story short because XPSE always rather a Error unterstellt, as a go through To let.

such Deklarationen (imho alike whether global or local) should to the Programmablauf occur, except naturally The Deklarationen which extra for created are - How z.B. these by Var.

the has something with Includes and Units To do, in them nunmal not only functions declared his must separate Programmteile same carryed out go can.

XProfan self interprets whom code and sees this in Ablaufreihenfolge - this luxery can only very terminable without real Perform emulieren - wohlbemerkt it imho even harmful his can also because of the Overview one Source code.

naturally should XPSE not absolutely warn - particularly there it Yes functions.

Gegenargumentieren could one with you become from slip, if you already the Deklare in the middle in the code have, over this Deklaration on these Variable grab - what then knallt. or only because it in XProfan functions means this yet long not, that it too for all further versions supported is - particularly unless explizit erwähnt is, that it even functions.

Well, and because XPSE even not smell can, which row objectively WANN carryed out becomes, and because it even none disadvantage means one Declare in head anzuwenden, warns it rather.

is really the Deklarieren of static Arrays by Declare in dynamischer Size allows? (I thought always here wären only Konstanten allows what this Anwarnen handfester make would. (imho I had it _auch therefore so gehandhabt))
 
03/23/09  
 




RGH
iF
is really the Deklarieren of static Arrays by Declare in dynamischer Size allows?


Yes! and in this drop can the DECLARE naturally first then in the code stand, after The Size the Arrays determined watts.

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
03/23/09  
 



Jupp, is then too clear...

will be I correct! (if again in the land, ought to these week yet what go)
 
03/23/09  
 



RGH

iF
is really the Deklarieren of static Arrays by Declare in dynamischer Size allows?


Yes! and in this drop can the DECLARE naturally first then in the code stand, after The Size the Arrays determined watts.

Greeting
Roland


Hm?
CompileMarkSeparation
Hierbei standing of course of term since The function too over the Deklaration, but...
 
03/23/09  
 




Stephan
Sonneborn
RGH

iF
is really the Deklarieren of static Arrays by Declare in dynamischer Size allows?


Yes! and in this drop can the DECLARE naturally first then in the code stand, after The Size the Arrays determined watts.

Greeting
Roland


Hello Roland, Hello David,

thanks for Your raschen Answer!

I had as Workaround first time the aray static on the Programmanfang staid, around the XPSE benefit to. but now place ichs again there there, where it original was and will be simply time Waiting, what a evtl. Update of XPSE bring...

BTW: After well two years without XProfan - Programming (because of Hausumbau etc.) machts Real again gigant Fun!!!
 
Schöne Grüße aus Wittgenstein
von Stephan

Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz
03/24/09  
 



Stephan Sonneborn
BTW: After well two years without XProfan - Programming (because of Hausumbau etc.) machts Real again gigant Fun!!!


so does it but not!
 
03/24/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

5.558 Views

Untitledvor 0 min.
p.specht01/10/18
Georg Teles02/13/16
GDL08/24/15
Richi11/14/13

Themeninformationen

this Topic has 3 subscriber:

iF (4x)
Stephan Sonneborn (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