| |
|
|
- Page 1 - |
|
RudiB. | Hi,
have one small trouble that I not solve can, or not understand. my Interpreter crashes me with folgendem Source ex / depends itself on.....but Why because only. What do I do there wrong ?? has someone a idea and can me help ?
Download |
|
|
| |
|
|
|
« this Posting watts as Solution marked. » |
|
RGH | Yes, and it watts of me objectively seinerzeit so eigebaut:
The Arrays are zero-basierend and the indicated at Dimensionieren gives the each latest element on. The concept Size on some to put Help is here objectively misleading.
background the story: Seinerzeit (to about 18 years with Profan² 6) watts Profan² yet gladly used, circa BASIC-programs to windows To portieren. into different BASIC-Dialekten there were The Arrays time zero-basierend and times with 1 beginnend. with of my Solution could both mutants simply übernommen go. who a not zero-based Source nutzte, circa about one Schachbrett to program coming with Declare area%[8,8] from, even if since the boxes with 0 as index unbenutzt stayed. who of a zero-basierendem BASIC coming, having too with Declare area%[7,7] no Problems.
Also likes too The Pascal-spelling, The with Arrayas always the (first and) latest element and not The Size angibt, my damalige decision affect having.
correctly. is, that The Help sometimes something misleading is, if I of Size write, because The eigentliche Size is by the 0-element Yes in eachone size one More.
Change can I on it to 18 years well nothing more (except on the Help-Text naturally) without To Kompatibilitätsproblemen with existing Source code To come. (imaginable would not more than one switch, around the Arrays from Programmierersicht 1-basierend To make, so with area%[8,8] then objectively one aray the Size 64 beginnend with area%[1,1] created becomes.)
Greeting Roland
PS: end this year entwickle I already 25 years to profane. i'll old! ;) |
|
|
| XProfan X3Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 02/01/16 ▲ |
|
|
|
|
|
RudiB. | Sorry...Whileloop 3 and Repeat 2 Durchläufe... CompileMarkSeparationSet("ErrorLevel", 2)
CLS
Declare list$[2,2],Abgleich$,counter%
Liste$[0,0]="2"
Liste$[0,1]="Test 1"
Liste$[0,2]="3.30"
Liste$[1,0]="5"
Liste$[1,1]="Test 2"
Liste$[1,2]="4.50"
Liste$[2,0]="3"
Liste$[2,1]="Test 1"
Liste$[2,2]="1.20"
Whileloop 3
Abgleich$=list$[&loop-1,1]
print &loop-1
counter%=1
Repeat
If list$[counter%,1]<>""
If list$[counter%,1]=Abgleich$
Print "Treffer"
'traceon
list$[&loop-1,0]=st$(Val(list$[&loop-1,0])+Val(list$[counter%,0]))
list$[&loop-1,2]=st$(Val(list$[&loop-1,2])+Val(list$[counter%,2]))
list$[counter%,0]="":list$[counter%,1]="":list$[counter%,2]=""
'traceoff
EndIf
Endif
Inc counter%
Until counter% >=2
Endwhile
whileloop 3
Print &loop-1,list$[&loop-1,0],list$[&loop-1,0],list$[&loop-1,0]
EndWhile
waitinput
|
|
|
| Xprofan X4 Rudolf Beske / München
Hardware: NB Intel I9 - 16GByte RAM | 12/28/15 ▲ |
|
|
|
|
RudiB. | here yet The Error Message....
|
|
|
| |
|
|
|
Jörg Sellmeyer | [OFFTOPIC]If you your code in code-Tags pack, is it leichter readable.[/OFFTOPIC]
by me runs the program without To grumble through. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 12/28/15 ▲ |
|
|
|
|
RudiB. | Habs straight with XProfan 11.2 tested....there GEHTS too..however with 9 + 10 crash....versteh I do not.....but nevertheless thanks for look at....good Slip in that new year...all... |
|
|
| |
|
|
|
| @rudi: Declare list$[2,2] Val(list$[&loop-1,2])
second size has Indexe 0;1, but not 2. |
|
|
| |
|
|
|
RudiB. | still, still....have You well misread.
Declare list$[2,2] // the are 9 items List$[0,0],List$[0,1],List$[0,2],List$[1,0]..........List$[2,1],List$[2,2] |
|
|
| |
|
|
|
| list$[2,2] has 2x2=4 Entries:
Help
with static Arrays follows behind the Postfix in eckigen clinging The indicated the Size.
Indexes= 0,0 1,0 0,1 1,1
look: CompileMarkSeparation index begins with 0. |
|
|
| |
|
|
|
RudiB. |
?? look |
|
|
| |
|
|
|
| Error in SizeOf with Your example, must 4 with out-come.
must Roland fixen, habs with Bugs einsortiert: [...] |
|
|
| |
|
|
|
RudiB. |
then should XProfan but already in line 8 maulen..... but it does first if I as here row 15 einfüge.== the element there not. !!
and end of my listings go The values indeed again correctly read. (Whileloop) |
|
|
| |
|
|
|
| Fehlende Fehlermeldungen and Wrong SizeOf-Result rather not as reference use.
declare a$[2,2] definiert 4 boxes, not 9. (is in quite all Programmiersprachen so the case)
If you 9 boxes want then [3,3].
so standing it too in the XProfan-Help. |
|
|
| |
|
|