Nice TWiki > Doc > NiceToggleExample (r1.1 vs. r1.2) TWiki webs:
Dev | Doc | Main | TWiki | Sandbox
Doc . { Changes | Index | Search | Go }
 <<O>>  Difference Topic NiceToggleExample (r1.2 - 24 Dec 2003 - IsaacGouy)
Changed:
<
<

value(t@Toggle){ return t.state; }

>
>

value(Toggle t){ return t.state; }

Changed:
<
<

activate(t@Toggle){

>
>

activate(Toggle t){

Changed:
<
<

-- IsaacGouy - 30 Aug 2003

>
>

-- IsaacGouy - 24 Dec 2003


 <<O>>  Difference Topic NiceToggleExample (r1.1 - 30 Aug 2003 - IsaacGouy)
Added:
>
>

%META:TOPICINFO{author="IsaacGouy" date="1062254769" format="1.0" version="1.1"}% %META:TOPICPARENT{name="CodeExamples"}%

/* Please try the BeginnerExamples before the IntermediateExamples
   Put this code in a subdirectory: methcall_intermediatetwo\toggles 

To compile:
   nicec toggles
*/

package toggles;

class Toggle {
    boolean state = true;

    boolean value();
    Toggle activate();
}

value(t@Toggle){ return t.state; }

activate(t@Toggle){ 
    t.state = !t.state; 
    return t; }

-- IsaacGouy - 30 Aug 2003

Topic NiceToggleExample . { View | Diffs | r1.2 | > | r1.1 | More }
Revision r1.1 - 30 Aug 2003 - 14:46 GMT - IsaacGouy
Revision r1.2 - 24 Dec 2003 - 21:35 GMT - IsaacGouy
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.