| |
|
|
Timotheus | P2CPP is a very nützliches Tool, that The written programs explicit speed, straight with complex and umfangreichen Berechnungen only RAM. in the average yields itself then with of/ one such application a Beschleunigung around the factor 10 or more. with normalen Datenmengen is XP thereby enough, GDO operates z.B. too with XP11 and is for usually already to some sec ready. with very large Datenmengen needed one but a Portierung in a others Language, How z.B. Assembler or P2CPP. One comparison the Geschwindigkeiten with one such Program yielded z.B. the following:
älterer computer: XP11: 181s P2CPP: 3,5s
neuerer computer: XP11: 52s P2CPP: 1,7s
The Author Although not any more accessible, for diejenigen The but yet to the, zumindestens informatischen, die the Autors a Full Version receive having, is this Tool furthermore very useful. Perhaps is Sebastian king suddenly defunct, so How Dietmar horn, so that it The software therefore not further banish can. from the Prospeed.dll I had z.B. too time a Full Version käuflich related, The is now but Freeware and not verschollen.
as Compiler eignet itself BCC55, which it here as Freeware to that Download gives: [...]
The Version 2.0b contains however, a couple Error. an Overview:
1. Mod
a% = b% Mod (c%*d%) becomes nA = nB (_L(nC*nD) % _L());
Solution: P2CPP or the Compiler show a Error on. These row folgendermaßen vereinfachen:
$IFDEF P2CPP z% = (c%*d%) a% = b% Mod z% $ELSE a% = b% Mod (c%*d%) $ENDIF
2. Inc and $IFDEF
one of $IFDEF and $ENDIF eingeklammerte Inc becomes fälschlicherweise To eachone Time eingebunden.
Solution: After Incs Search and independent of bedingter Compilierung make
3. &MemDC
a% = &MemDC becomes nA = ReadLong(g_hMemDC, );
Solution: Compiler shows whom Error on. there whom Error folgendermaßen repair:
MCls 100,100 $IFDEF P2CPP 'P2CPP: <INLINE_CPP> nA = (long)g_hMemDC; 'P2CPP: </INLINE_CPP> $ELSE a% = &MemDC $ENDIF
4. & Loop
& Loop in a normalen Whileschleife sustain yet The values of XP10, not XP11. that is this
Whileloop 10 a% = 1 While a% = 1 print & Loop a% = 0 Wend Wend
becomes under P2CPP and To XP10 zehnmal "1" outputted, XP11 "1" - "10". under XP11 must & Loop therefore of/ one local Variable allocated and be these then in the second Loop uses go, not & Loop self. GDO can The &Loop's find The not a Whileloopschleife surrounding are: [...]
5. a% > b%/c%
if a% > b%/c% becomes if (_D(nA>nB) / _D(nC))
P2CPP clinging here differently as XP, the the Division precedence gives, therefore must The clinging to Kompatibilitätswahrung with (">" or "<") and ("/" or "\") manually staid go. GDO can any Lines find in them a such Zusatzklammer necessary his could: [...]
6. a%*b%\c%
a% = b%*c%/d% 'vollständige Division e% = b%*c%\d% 'ganzzahlige Division becomes nA = nB*_D(nC) / _D(nD); nE = nB*(int)(nC / nD);
XP accounts first The Multiplikation then The Division, e%=(b%*c%)\d%, P2CPP power it very andersrum. this is with vollständiger Division unproblematisch (commutative law), with ganzzahliger Division are The Results but different. the concerns Lines with "*"And "\". GDO can any Lines find in them a Zusatzklammer necessary his can: [...]
The Error go in a Textdatei during one Durchlaufs to grafischen statement abgespeichert, if in the config.ini "P2CPP" on "1" staid is. |
|
|
| |
|
|
|
Sven Bader | Since I again longer Profan2CPP To do have dokumentiere I here items, over The I so stolpere. I use The Version 2.0a
whom beginning would like I with the Zeilenweise Reading Files make
1.
this example functions fine with under windows begot Files, with Files from Linux/Unix/mac entourages comes it To Fehlern. Profan2CPP shining here coercive one CR LF as Line break To expect means \r\n and not only \n or only \r
The effect falls in my Tests different from. with VC++ (1998) missing eachone row the first characters, there here well the fehlende "\r" übersprungen becomes. with Borland C++ 5.5 becomes felt everything hacking and one alights To everything catastrophe at Reading in a Endlosschleife.
an (if too Mallet)-Solution is the correct the Zeilenumbrüche and Save as KOPIE. my Solution isn't integrally tidy, there tappt im dunkeln \r goes \r\n austauscht and thereafter double \n in simple umwandelt. the can before available vain Lines in the File delete.
'File correct
Dim area#, FileSize(File$)
BlockRead(File$, area#, 0, FileSize(File$))
content$ = String $(area#,0)
content$ = translate $(content$,Chr$(10),Chr$(13)+Chr$(10))
content$ = translate $(content$,Chr$(13)+Chr$(13),Chr$(13))
dispose area#
Dim area#, len(content$) + 1
String area#,0 = content$
Assign #1, File$+".tmp"
OpenRW #1
BlockWrite #1, area#, 0, len(content$)-1
Close #1
dispose area#
'copy Zeilenweise read without Problems
Assign #1,File$+".tmp"
Reset #1
i& = 0
WhileNot Eof(#1)
Input #1,row$
getLine($ row)
EndWhile
Close #1
2. allegedly incorrect Parameter-amount
this becomes at Syntaxcheck with manchen Call displayed. one can whom Error ignore, since the programs end nevertheless correctly walk. nevertheless nervt it, it with eachone Compilierung confirm To must and above evtl. real Error To miss out on.
The Solution stick here in the File subfuncs.dat or. funcdb.dat in the \data\ directory of Profan2CPP, here can The Parameterzahlen korrigiert go How to that example ogl.outlinefont 2 instead of 1 and ogl.pyramid with 3 instead of 2.
|
|
|
| |
|
|
|
Sven Bader | a Have I yet
3. omen
One Vorzeichenminus created in combination with a less-Operator a Error Compilieren.
cls
declare i&,j&
i& = 5
j& = 10 - -i&'Error
j& = 10 + -i&'ok
j& = 10 - -1'Error
j& = 10 + -1'ok
j& = 10 + +1'Error
j& = 10 - +1'ok
print j&
waitkey
end
means j& = 10 - -i& is not, j& = 10 + -i& against it functions. its thereby alike whether the omen at a number or Variable standing. One doppeltes plus (Operator + omen) goes neither, there can be naturally the omen simply omit.
The Solution? an Klammer the number with the omen: j& = 10 - (-1) |
|
|
| |
|
|
|
Sven Bader | yet something about Abstürze , I straight again so a drop having...
These zurück occasionally (then reproduzierbar) at Übersetzen on, means if P2CPP "Übersetze..." indicating. The Prozentzahl to the crash, gives here too a vaguely idea from the place in the code.
it comes here well To Zugriffsverletzungen, because at sheer on old systems (Windows XP) runs The Translation tidy through.
following row was in example for a crash Responsible.
factor! = 1.0 / Max(0.00001, sqrt(cross![0] * cross![0] + cross![1] * cross![1] + cross![2] *cross![2]))
With me is already the mathematically irrelvante add of clinging helped, around the crash To avoid:
factor! = 1.0 / Max(0.00001, sqrt((cross![0] * cross![0]) + (cross![1] * cross![1]) + (cross![2] *cross![2])))
it shining however a defined crowd "kritischer" Lines for a crash necessary To his, I it in a small code not reproduzieren could.
too in the past tense were always Verkettungen vieler Operators The cause. The Solution are always clinging or Teilrechnungen in a variable zwischenspeichern. |
|
|
| |
|
|
|
Sven Bader | Addfiles with Unterverzeichnissen means führendem star, not working with absoluten Pfaden.
here disembark of course Files the Listbox from the angegebenen directory but the way to File is instead the actually Arbeitsverzeichnis and so wrong! In historyPath$ stick one absolute way. To fix can it itself, because one to the process of AddFiles into concerned directory changes.
Regex
XProfan 1 as much as you want Whitespaces, then cat as ganzes word (case-insensitive) 4 as ganzes word (case-insensitive) 4 first not-Whitespace
Profan2CPP -1 abweichend 4 fit 1 abweichend
who here correctly. lying and why, it in Profan once the small and once the large ~S need, white I do not, I in the Use with Regex not very experienced be. |
|
|
| |
|
|
|
Sven Bader | the Topic clinging had we already a couple time but very the faith I not yet:
circa terms with or or and (|, &) ought to always a Klammer, otherwise goes it in P2CPP not:
wrong
correctly.
|
|
|
| |
|
|