ALGOL 68/prelude: Difference between revisions

(lang -> syntaxhighlight)
(→‎string in string: more bugfix)
 
(3 intermediate revisions by the same user not shown)
Line 63:
BOOL found := FALSE;
CHAR first char = s[ LWB s ];
INT first pos := LWB t;
INT end pos = UPB t;
INT s length = ( UPB s - LWB s ) + 1;
INT first pos := LWB t;
INT end pos = ( UPB t - s length ) + 1;
WHILE NOT found AND first pos <= end pos DO
found := char in string( first char, first pos, t[ first pos : @ first pos ] );
Line 71:
# the first character is not present #
first pos := end pos + 1
ELIF first pos > end pos THEN
# the first character is present but the rest of the string #
# is too short to contain s #
found := FALSE
ELIF s = t[ first pos : first pos + ( s length - 1 ) ] THEN
# found the full string s at first pos #
Line 84 ⟶ 88:
 
=== aArray.a68 ===
 
An associative array MODE for STRING keys and values. This is used by a number of Rosseta Code tasks.
<syntaxhighlight lang=algol68># associative array for STRING elements and keys #
Line 250 ⟶ 255:
 
These names next were intended for internal compiler use only: אBEYOND, אBFILE, אBOOK, אCOLLECTION, אCOLLITEM, אCONV, אCPATTERN, אFLEXTEXT, אFPATTERN, אFRAME, אGPATTERN, אINSERTION, אINTYPE, אNUMBER, אOUTTYPE, אPATTERN, אPICTURE, אPIECE, אPOS, אROWS, אSFRAME, אSIMPLIN, אSIMPLOUT, אSINSERT, אSTRAIGHTIN, אSTRAIGHTOUT, אTEXT, אalignment, אassociate format, אbfileprotect, אbook bounds, אchainbfile, אchar dig, אcheck pos, אcurrent pos, אdig char, אdo fpattern, אedit string, אfalse, אfile available, אfrom bin, אget char, אget good file, אget good line, אget good page, אget insertion, אget next picture, אgremlins, אidf ok, אindit string, אline ended, אlockedbfile, אlogical file ended, אmatch, אnext pos, אpage ended, אphysical file ended, אput char, אput insertion, אset bin mood, אset char mood, אset mood, אset read mood, אset write mood, אstandardize, אstaticize frames, אstaticize insertion, אstring to L int, אstring to L real, אsubfixed, אsubwhole, אto bin, אundefined, אL standardize
<!--[[Category:ALGOL 68|*]]-->
3,021

edits