| |
|
|
 Jörg Sellmeyer | How can I certainly the position the detect, the whom comment einleitet? an row is z.B.: CompileMarkSeparationTest$ = "test" + Test1$ + " hier" + Str(4 * 3) + "so" Test$ = "test" + Test2$ + " da " + Str(4 * 3) + " auch" mal sehen > No thoughts over The Sinnhaftigkeit the Codes; and unordentlicher Style is it too - must but nevertheless recognized go.
Greeting Jörg |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 10/12/06 ▲ |
|
|
|
|
 | step one is the Remove the Strings and supplant in a Spezialphrase.
look my Codeanzeige here power it likewise - and it functions Yes.
Z.B. becomes from String 1 (in o.G. drop) °[1]°, and String 2 °[2]°. then seek You simply to and cut ex. joining must You only °[1]° and °[2]° again zurücktranslaten and ready. |
|
|
| |
|
|
|
 Jörg Sellmeyer | so similar have ichs me already virtual but aufs supplant be I do not come  Thank you! |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 10/12/06 ▲ |
|
|
|
|
 Michael Wodrich | I use there the (well slower) SUCHET, SO WERDET IHR GEFUNDEN CompileMarkSeparation
Proc Search_Comment
Null bedeutet: nicht gefunden, sonst Position im String
Parameters Suchtext$
Declare i&, c%, intxt%, Buf#, L&, Ergebnis&
Ergebnis& = -1
L& = Len(Suchtext$)
Dim Buf#, L& + 1
String Buf#,0 = Suchtext$
WhileLoop 0,L& - 1
c% = Byte(Buf#,&Loop)
Case c% = 34 : intxt% = not(intxt%) Anführungszeichen
If (c% = 39) and (intxt% = 0) Kommentarzeichen (und nicht im String)
Ergebnis& = &loop
BREAK
EndIf
EndWhile
Dispose Buf#
Ergebnis& = Ergebnis& + 1
Return Ergebnis&
EndProc
Declare TestString$, erg&
TestString$ = "Test$ = qtestq + Test1$ + q hierq + Str(4 * 3) + qsoqTest$ = qtestq + Test2$ + q da q + Str(4 * 3) + q auchq mal sehen"
cls
print "Das Ergebnis sollte 56 sein."
erg& = Search_Comment( TestString$ )
if erg& = 0
print "Kein Kommentarzeichen gefunden."
else
print "Kommentarzeichen gefunden an Position", Format$("##0",erg&)
print " "
print Space$(erg& - 1) + "v"
print TestString$
print Space$(erg& - 1) + "^"
endif
print " "
waitkey
../../funcion-referencias/XProfan/end/'>end
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/12/06 ▲ |
|
|
|