| |
|
|
 Jörg Sellmeyer | ¿Cómo se puede Yo sicher el Position des ermitteln, el el Kommentar einleitet? Un Línea es z.B.: KompilierenMarcaSeparaciónTest$ = "test" + Test1$ + " hier" + Str(4 * 3) + "so" Test$ = "test" + Test2$ + " da " + Str(4 * 3) + " auch" mal sehen > Keine Gedanken en Sinnhaftigkeit des Codes; y unordentlicher Stil es auch - muß aber trotzdem erkannt voluntad.
Saludo Jörg |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 12.10.2006 ▲ |
|
|
|
|
 | Schritt Eins es el Entfernen el Cuerdas y sustituir en un Spezialphrase.
Schau mi Codeanzeige hier macht lo ebenso - y lo funktioniert sí.
Z.B. se de String 1 (en o.G. Fall) °[1]°, y String 2 °[2]°. Dann suchst Usted simplemente después de y schneidest de. Anschliessend musst Usted sólo °[1]° y °[2]° otra vez zurücktranslaten y fertig. |
|
|
| |
|
|
|
 Jörg Sellmeyer | So ähnlich habe ego me ya pensamiento aber aufs Ersetzen bin Yo no gekommen  Gracias! |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 12.10.2006 ▲ |
|
|
|
|
 Michael Wodrich | Yo nutze como el (wohl langsamere) SUCHET, SO WERDET IHR GEFUNDEN KompilierenMarcaSeparación
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
Schöne Grüße Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 12.10.2006 ▲ |
|
|
|