Annotation of parser3/tests/160.html, revision 1.3

1.1       misha       1: @main[]
1.3     ! misha       2: $sDir[outputs/160]
        !             3: $iStep(1)
        !             4: $iSleepTime(3)
        !             5: $iCacheTime(2)
1.1       misha       6: 
1.3     ! misha       7: <table border="1" cellpadding="3">
        !             8: <tr>
        !             9: <th>File: 1</th>
        !            10: <th>File: 2</th>
        !            11: <th>File: 3</th>
        !            12: </tr>
1.1       misha      13: 
1.3     ! misha      14: <tr>
        !            15: <td>
        !            16:        ^do[1](3){One}
        !            17: </td>
        !            18: <td>
        !            19:        ^do[2](3){Two}
        !            20: </td>
        !            21: <td>
        !            22:        ^do[3](3){Three}
        !            23: </td>
        !            24: </tr>
1.1       misha      25: 
1.3     ! misha      26: 
        !            27: <tr>
        !            28: <td><br /></td>
        !            29: <td><br /></td>
        !            30: <td>
        !            31: ^do[3](3){
        !            32:        ^method[]
        !            33: }{
        !            34:        $exception.handled(1)
        !            35:        ^cache(2)
        !            36:        Error occure while executing body
        !            37: }
        !            38: </td>
        !            39: </tr>
        !            40: 
        !            41: # wait till cache expire
        !            42: <tr>
        !            43: <td colspan="3">
        !            44: ^sleep($iSleepTime)
        !            45: ^^sleep($iSleepTime)
        !            46: </td>
        !            47: </tr>
        !            48: 
        !            49: 
        !            50: <tr>
        !            51: <td>
        !            52: ^do[1](3){
        !            53:        ^method[]
        !            54: }{
        !            55:        ^cache(1)
        !            56:        $exception.handled[cache]
        !            57:        Error occure while executing body but force get cached resuls
        !            58: }
        !            59: </td>
        !            60: 
        !            61: <td>
        !            62: ^do[2](3){
        !            63:        Two
        !            64:        ^cache(0)
        !            65: }
        !            66: </td>
        !            67: 
        !            68: <td>
        !            69: ^do[3](3){
        !            70:        ^method[]
        !            71: }{
        !            72:        $exception.handled(1)
        !            73:        ^cache(0)
        !            74:        Error occure while executing body
        !            75: }
        !            76: </td>
        !            77: 
        !            78: 
        !            79: </tr>
        !            80: </table>
        !            81: 
        !            82: 
        !            83: @do[sFile;iSteps;jBody;jExceptionHandler][i;bProcessBody;bProcessErrorHandler;iTime;sBody]
        !            84: ^for[i](1;$iSteps){
        !            85:        $iTime[]
        !            86:        $bProcessBody(0)
        !            87:        $bProcessErrorHandler(0)
        !            88: 
        !            89:        $sBody[^cache[$sDir/$sFile]($iCacheTime){
        !            90:                $jBody ($i)
        !            91:                $bProcessBody(1)
        !            92:                $iTime(^cache[])
        !            93:        }{$bProcessErrorHandler(1)$jExceptionHandler}]
        !            94: 
        !            95:        ^if($bProcessBody){
        !            96:                Executed code, ^^cache[] value ^if(def $iTime){defined}{undefined},
        !            97:        }{
        !            98:                ^if($bProcessErrorHandler){
        !            99:                        Process error handler, 
        !           100:                }{
        !           101:                        Get cached result,
1.1       misha     102:                }
                    103:        }
1.3     ! misha     104:        
        !           105:        result: $sBody
        !           106: }[<br />]
        !           107: ^iStep.inc(1)
1.1       misha     108: 

E-mail: