English
Forum

Done: Escapesequenzen: What happens to the String

 

E.T.
Hello all,
in this little Prog happens by me the following:
attempt 2 yields as spending: String 2 : IcineinePfad-indicated
attempt 3 yields as spending: String 3 : IchwillucheinePfad-Angabesein!!
CompileMarkSeparation
 {$IQ}

Proc XPath

    Parameters x_PfadInput$
    Declare x_PfadOutput$
    Clear x_PfadOutput$

    While @Len(x_PfadInput$)

        x_PfadOutput$ = x_PfadOutput$ + @Left$(x_PfadInput$,1)
        Case @Left$(x_PfadInput$,1) =  : x_PfadOutput$ = x_PfadOutput$ +
        x_PfadInput$ = @Del$(x_PfadInput$,1,1)

    EndWhile

    Return x_PfadOutput$

EndProc

Declare Text$
cls
Text$ = C:ProgrammeProgrammXYZUVZ1Programm.exe
print 1. Versuch
print String 1 : ,Text$
print =============================================================
print String 1 zurück : , XPath (Text$)
print =============================================================
Print
print 2. Versuch
Clear Text$
Text$ = IchineinePfad-Angabe
print String 2 : ,Text$
print =============================================================
print String 2 zurück : , XPath (Text$)
print =============================================================
Print
print 3. Versuch
Clear Text$
Text$ = IchwillaucheinePfad-Angabesein!!
print String 3 : ,Text$
print =============================================================
print String 3 zurück : , XPath (Text$)
print =============================================================
Print
print 4. Versuch
Clear Text$
Text$ = >>>Ich bin ein ganz normaler String<<<
print String 4 : ,Text$
print =============================================================
print String 4 zurück : , XPath (Text$)
print =============================================================
Print
Print WAS PASSIERT IM 2. UND 3. VERSUCH MIT DEM STRING ???
waitinput
./../../references-fonction/XProfan/end/'>end

where are because my letters / characters from in the Var Text$ there ??

Mario
 
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...
03/19/08  
 



Escapesequenzen mind?
 
03/19/08  
 




E.T.
One String ought to still one String stay, or ???
If the z.B. with the Return of @ChooseDir$(s) happens , the very The follow of characters in the Rückgabestring standing, what then ??

Mario
 
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...
03/19/08  
 




Sebastian
König
Hello Mario,

In XProfan and many others Programmiersprachen is it normally, that by a Backslash in Literalen (and only there, not String-Variables and Function-Rückgaben) Special Sonderzeichen displayed go, z.B.
for a Line break. an very list find You in the XProfan-Help under Escape-Sequenzen.

concise: If you a Backslash want, always \ write...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
03/19/08  
 




E.T.
What do I do then with the Return of z.B. @ChooseDir$(s) (there ists me today noticed) ?? this is one String with only einfachen Backslashs, whom I Yes in a
variables (XYZ$) Save must, circa these moreover To process.

Mario
 
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...
03/19/08  
 



@Mario


What do I do then with the Return of z.B. @ChooseDir$(s) (there ists me today noticed) ?? this is one String with only einfachen Backslashs, whom I Yes in a
variables (XYZ$) Save must, circa these moreover To process.


Verdopple it with Text$=Translate$(Text$,,\)
 
03/19/08  
 




RGH
Horst horn
@Mario

Horst horn
What do I do then with the Return of z.B. @ChooseDir$(s) (there ists me today noticed) ?? this is one String with only einfachen Backslashs, whom I Yes in a
variables (XYZ$) Save must, circa these moreover To process.


Verdopple it with Text$=Translate$(Text$,,\)


FALSCH! (or at least superfluously, there your row very nothing bewirkt!)
The double Backslash is only in LITERALEN necessary, circa a eifachen Backslash darszustellen, How Sebastian already eindeutig in Übereinstimmung with the XProfan-Help declared has. means only if in the Programmtext one Backslash between two quotation marks (means in a Stringliteral) vorkommt, is it (the Backslash) through two To supplant, there it otherwise as Escapezeichen interprets becomes.

with Pfadangaben must You incidentally, around the Backslash-Problematik To bypass, too whom normalen Slash (/) use. the Betriebssystem comes so very so clear.

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
03/19/08  
 




E.T.
Hm,
and if ichs so to Horst make:
CompileMarkSeparation
then have only simple s in way1$ stand. and accordingly still the same trouble.

Mario
 
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...
03/19/08  
 




E.T.
AHA,

if I whom way by hand eingebe, becomes it, if it only simple s has, verdreht.
now have I me even time whom way C:IchineinPfad laid out, this with ChooseDir$ quizzed and Show let (How obendrüber), then Better get going not verdreht.
though beideErgebnisse yes a StringLiteral are.

Well, Why too always, again what learnt....

thanks all
Mario
 
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...
03/19/08  
 




E.T.
somehow shining my @Translate$ today quite nothing make To want....

but slow dämmerts, too ifs long gedauert has: an Ergebniss of z.b.
@chooseDir$(... is Yes the Erg. of/ one function, therefore stehts correctly. there.

If I this Erg. now with Translate transfiguring wants, z.B. circa it in a INI To Save and later again aufzurufen, does it not. but is too yet....
 
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...
03/19/08  
 



@Roland


FALSCH! (or at least superfluously, there your row very nothing bewirkt!)


so FALSCH! can the none his
I contradict you ungern, but if I former (knows not any more, under which Version) a way in a INI-File normal abgespeichert having, got I then with using the Pfades (COPY, LOAD or Ä. Fehlermeldungen - can File not loading or can File not copy) - then Have I me angewöhnt, any Paths with TRANSLATE$( ) with double Backslash into INI-File To write. the dislike elegant his or Perhaps neither More necessary. but it functions! The double Backslash do keinem painful, in the age of gigant RAM-Save and GB-Speichersticks play too a couple row More code no role and slower becomes the program neither. the over ands over again Überraschungen come along, on them XProfan not guilt is, Have I yesterday in the PROFAN-Forum red. under VISTA becomes the Startbild not LoadBmp... loaded !? - Rolf (stolzer VISTA-user) confirm the and writes, to one double Loadbmp... directly one after another works it. means too a Fehlfunktion, The nothing with XProfan to do has - i'm no genius and quäle me manchesmal through my View source, there me grundlegendes know in my boys years not mediate watts. Chefprogrammierern here in the Community can I never the waters wealthy, but my programs walk on unterschiedlichen Systemen and yet Have I (too with Help all) possible any Fehlermeldungen umschifft. the Text$=TRANSLATE$(Text$,,\) becomes too furthermore in my code stand. so FALSCH! can it namely not his -
Sorry for long Text - but finally hot I indeed horn

[offtopic]PS: the should no menace his !
Easter becomes PASS-PORT 2.0 here uploaded. there in the Version The data according to wish on a beliebigen Speicherplatz copies go can, is here naturally too ChooseDir$ in Benutzung. The Zielwege go any with Translate....
registered and it functions ![/offtopic]
 
03/20/08  
 




Sebastian
König
@Horst: your Translate-appeal bewirkt objectively nothing, there it The Backslashes even not double! The subesquent code demonstrating this:
CompileMarkSeparation
cls
var s1$ = C:\test\hallo
var s2$ = TRANSLATE$(s1$,,\)
print Alt:, s1$
print Neu:, s2$
waitkey
e

Statement: both Strings, sowohl as well as \, to put only a einfachen Backslash dar, the whole is means only one Calling the manner Text$=TRANSLATE$(Text$,A,A)... because: \ is completely correctly one Backslash, though too, because XProfan with unidentified Escape-Sequenzen not bleats separate only whom Backslash stand can....

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
03/20/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

2.564 Views

Untitledvor 0 min.
H.Brill05/08/23
Walter12/26/22
Member 361000512/01/22
RudiB.09/17/22
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