English
C ++ Forum

Difference INI-Files between XP-11 and P2CPP2.0

 

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
declare INI_Datei$
declare temp1%
declare temp2!
 $IFDEF P2CPP
INI_Datei$ ="D:\TMP\P2CPPTEST.INI"
 $ENDIF
 $IFDEF COMPILER
INI_Datei$ ="D:\TMP\XP11TEST.INI"
 $ENDIF

whileloop 8

    temp1% = @rnd(500)
    temp2! = @rnd()*500
    WriteIni INI_Datei$,"Integer","Parameter-"+@trim$(@str$(&loop)) = temp1%
    WriteIni INI_Datei$,"Float","Parameter-"+@trim$(@str$(&loop)) = temp2!

Gruß
Karl-Heinz
WIN XP home/Pro / XPROFAN 11 / P2CPP
ATMEL + BASCOM Fan
12/17/08  
 




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
proc meineProc(a%,b%,c%)

    return a%+b%+c%

endproc


small XPSE 2: (no PROC and ENDPROC, instead How z.B. in c#, php and js geschweifte Klammer for block.)
CompileMarkSeparation
meineProc(a%,b%,c%){

    return a%+b%+c%

}


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:
CompileMarkSeparation
(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?
 
12/17/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.380 Views

Untitledvor 0 min.
rquindt05/31/20
funkheld12/16/13
H.Hackl03/05/12

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