DiaryStuff Example Namespace

:Namespace DiaryStuff
:Using System
    
    :Class DiaryEntry
        :Field Public When
        :Field Public What
         Make(ymdhm wot)
          :Access Public
          :Implements Constructor
          When What(⎕NEW DateTime(65ymdhm))wot
          ⎕DFWhen What
        
         Make0
          :Access Public
          :Implements Constructor
          When What⎕NULL''
        
    :EndClass ⍝ DiaryEntry
    :Class Diary
        :Field Private entries0⎕NEW DiaryEntry
         RAdd(ymdhm wot)
          :Access Public
          R⎕NEW DiaryEntry(ymdhm wot)
          entries,R
        
         RDoingOn ymd;X
          :Access Public
          X,(entries.When.(Year Month Day))^.=3 13ymd
          RX/entries
        
         RRemove ymdhm;X
          :Access Public
          :If R/Xentries.When=⎕NEW DateTime(65ymdhm)
              entries(~X)/entries
          :EndIf
        
        :Property Numbered Default Entry
             RShape
              Rentries
            
             RGet arg
              Rarg.Indexersentries
            
             Set arg
              entries[arg.Indexers]arg.NewValue
            
        :EndProperty
    :EndClass ⍝ Diary
    
:EndNamespace