| |
|
|
KHR | Hello together,
as stolzer new users of P2CPP be I straight thereby some programs on P2CPP "umzustricken"
thereby has me the Behavior of P2CPP with write of INI-Files some Time cost[ed]. first to längerem Search have I then whom Difference discover.
XProfan GetControlParas (B Variablenwert (integer and float) automatically correctly. circa, P2CPP power the only integer correctly., floats GetControlParas (B it in integer circa.
naturally can the slight with @st$(float) bypass, but one must first time on it come, what and wieso there now differently runs. Perhaps use I there indeed only what, the sooner involuntary in XProfan functions and so not to usage virtual is.
here my example-Program and the Results: CompileMarkSeparation |
|
|
|
|
RGH | KHR
alike whether now bow or feature - one seek ne while To one The cause finds
Weder bow yet feature, separate falser Parametertyp: loudly Help is the last Parameter with WriteIni one String, means would one with @Str$() on the secure Page. let one this lane, clutching with XProfan The automatic Typumwandlung (see Help, cut offed 7.8 ), The whom numerischen worth in a Sttring umwandelt, where The Settings through @Set("Decimals",...) and @Set("NumWidth",...) berücksichtigt go. XProfan using for Writeini with Ini-Files solely The API-function WritePrivateProfileString. Möglicherweise uses P2CPP with numerischen Values The API WritePrivateProfileInt, what explain would, that here The conversion in a Integer results.
If one on the secure Page his would like, ought to one nothing the chance and the Typumwandlung not the Programming-Language give over. ;)
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/17/08 ▲ |
|
|
|
|
Sebastian König | Hi,
too in Profan2Cpp finds a automatic Typenumwandlung instead of (there's several versions for WriteIni() and according to type the last Parameters becomes The suitable called). The problem is, that Fließkommazahlen thereby yet not explizit berücksichtigt and be C++ evident in this drop rather The Integer- as The String-Version using. i'll the in the next Version Change, so the behaviour in Profan2Cpp and XProfan same is. Abgsehen of it has Roland naturally right so, that The usage of st$() in each drop The sicherste Variant ;).
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 12/17/08 ▲ |
|
|
|
|
| RGH
If one on the secure Page his would like, ought to one nothing the chance and the Typumwandlung not the Programming-Language give over. ;)
Greeting Roland
Jau!
The automatic Typumwandlung configures the Fehlerfinden sometimes quite langwierig.
there's but a undokumentierte spelling (xpse) which The Voraussetzungen erfüllt, that functions too only whom definierten type give back (can).
Normales XProfan: CompileMarkSeparation small XPSE 1: (no Parameters row) CompileMarkSeparation small XPSE 2: (no PROC and ENDPROC, instead How z.B. in c#, php and js geschweifte Klammer for block.) CompileMarkSeparation small XPSE 3: (Wegfall the Variablensuffixe, instead How z.B. in c#, php, js and pascal/delphi) CompileMarkSeparation small XPSE 4: (function "meineProc" to that type "int" deklarieren circa z.B. sure To to put, that z.B. no String zurückgegeben becomes) CompileMarkSeparation setting one whom type to the names of/ one function, becomes the Funktionswert too only of these type zurückgegeben. following mutants are seither present: CompileMarkSeparationbool meineProc(int a,b,c){return a+b+c}
int meineProc(int a,b,c){return a+b+c}
long meineProc(int a,b,c){return a+b+c}
float meineProc(int a,b,c){return a+b+c}
string meineProc(int a,b,c){return a+b+c}
(naturally must one then The functions not (as here in the example) in a only row "ziehen")
If it time interestingly becomes, then could xpse means too The Rückgabewerte of functions with Zuweisungen on Typengleichheit to check on - where it but eh as Überbringer unangenehmer messages celebrated becomes.
@KHR: XPSE was then too because of Profan2CPP emerged, functions {$cpp} with you or uses XPSE not? |
|
|
| |
|
|