[c]asfdasdfasdfasdfasdf

#6549290
Lesenswert?

1
Program Test;
2
{ $BOOTRST $00C00}         {Reset Jump to $00C00}
3
{$NOSHADOW}
4
{ $W+ Warnings}            {Warnings off}
5

6
Device = mega8, VCC=5;
7

8
Import SysTick;
9

10
From System Import;
11

12
Define
13
        ProcClock     = 1000000;            { Hertz                            }
14
        SysTick       = 10;                 { msec                             }
15
        StackSize     = $0100, iData;
16
        FrameSize     = $0100, iData;
17

18
{$IDATA}
19

20
{------------------------------------------------------------------------------}
21
{ Type Declarations                                                            }
22
Type
23

24
{------------------------------------------------------------------------------}
25
{ Const Declarations                                                           }
26
Const
27

28
{------------------------------------------------------------------------------}
29
{ Var Declarations                                                             }
30
Var
31

32
{$IDATA}
33
{------------------------------------------------------------------------------}
34
{ Functions }
35
Procedure Start;
36
  Begin
37
  End Start;
38

39
  
40
Procedure Main;
41
  Begin
42
  End Main;
43
  
44
  
45
Procedure InitPort;
46
  Begin
47
    PortB:=%00000000;
48
    DDRB:=%00000000;
49
    PortC:=%00000000;
50
    DDRC:=%00000000;
51
  End;
52
  
53
{------------------------------------------------------------------------------}
54
{ Main Program }
55
{$IDATA}
56

57
Begin
58
  EnableInts;
59
  InitPort;
60
  Start;
61
  Loop
62
    Main;
63
  EndLoop;
64
End Test.
Gast #6552540
Lesenswert?

Banausen!
1
let treeTagGet inStr = 
2
  try 
3
    let trimStr = String.trim inStr in
4
      let tagType = treeTagTypeGet trimStr 
5
      and right = String.index trimStr '>' in
6

7
        match tagType with
8
        | TagTypeNone -> ""
9
        | TagTypeClose -> String.sub trimStr 2 (right - 2)
10
        | TagTypeShort -> String.sub trimStr 1 (right - 2)
11
        | TagTypeOpen  -> String.sub trimStr 1 (right - 1)
12

13
    with Not_found -> ""

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren