English
Forum

Hash ForEach Error

 

Jörg
Sellmeyer
either functions here what not or I übersehe what.
The code is 1:1 from the Help. it runs free from problems. If I but a the ForEach-inquire in a procedure pack, there a Error Message: Variable not declared. thereby becomes then the Hash-aray angemeckert.
cls
declare string key, value
declare hash person[]

Proc display

    ForEach person[], key, value
    print st$(&loop) + ": " + key + " = " + value
    EndFor

ENDPROC

person["A","Vorname"]="Hans"
person[2,"Name","Hugo","X","Y"] = "Mustermann"
person["2","Geburtstag"] = "01.01.01"
person[4.5,"Wohnort"] = "Musterstadt"
person[2,"Alter"] = 34
person["A","Vorname","Test"] = "Hugo"
'ForEach person[], key, value
'
'   print st$(&loop) + ": " + key + " = " + value
'
'EndFor
'
display()
Print
ForEach person[2], key, value
print st$(&loop) + ": " + key + " = " + value
EndFor
print
ForEach person["A","Vorname"], key, value
print st$(&loop) + ": " + key + " = " + value
EndFor
Print
Print "Fertig!"
waitinput
end
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
11/09/15  
 




E.T.
probier time:

and hangle you then by the Fehlermeldungen

might on the space failure

ähm.. ForEach  ??
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
11/09/15  
 




Jörg
Sellmeyer
You seem not integrally on the ongoing To his, what The xprofane development angeht, or?
Hash are The new assoziativen Arrays.
How already written: the code is from the Help and runs too. only if I The Proc install, How supra, hakt it.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
11/09/15  
 




H.Brill
there shining well what not To voices.
If I the Hash-aray as Parameter commit,
becomes it recognized, then but well key and value
not. These are but too GLOBAL definiert.

Perhaps erliegen Jörg what about me indeed one fatalen mistake.
otherwise must we on Rolands response Waiting.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
11/09/15  
 




Jörg
Sellmeyer
I habs strain tested: if I in the procedure key and value ditto definiere, functions it How desired.
whether the so vorgesehen is?
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
11/09/15  
 



ForEach ought to it alike his, as long as key and value as variables
visible are. I wealth there should one Update since.
 
11/09/15  
 




Jörg
Sellmeyer
there are Yes not only the two Stringvariablen. the Hash-aray yourself becomes Yes not in the procedure recognized.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
11/09/15  
 




RGH
there shining itself one Bug in ForEach cache to have. naturally ought to it too with global variables functions. (even if globale variables in principle To avoid are. apiece larger the proposition, so larger the Ärger, whom tappt im dunkeln with the care desselben make. I promise from experience!)

for the time being as Workaround: variables for ForEach as Parameter transfer!

Greeting
Roland
 
XProfan X2
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
11/09/15  
 




RGH
I have nachgeschaut: I have it objectively so program, that ForEach (and For) only with local variables functions, where in the Hauptprogramm The global variables Yes pub are.

the can I in the next Update naturally Change ...

Greeting
Roland
 
XProfan X2
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
11/09/15  
 



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.733 Views

Untitledvor 0 min.
Michael W.02/06/17
Joerg04/28/16
Walter02/01/16
iF12/31/15
More...

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