{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare subroutine end_dialog\r\ndeclare function msg\r\n\r\n$insert msg_equates\r\n\r\nMessages = get_property( @window, '@Messages' )\r\nPointers = get_property( @window, '@Pointers' )\r\nCurTier  = get_property( @window, '@CurTier' )\r\n\r\nCurMessage = Messages<1,CurTier>\r\n\r\nNextPtrs = Pointers<1,CurTier>\r\nNextYes  = field( NextPtrs, ';', 1 )\r\nNextNo   = field( NextPtrs, ';', 2 )\r\n\r\nif ( NextYes = '' ) and ( NextNo = '' ) then\r\n   * THEY HAVE FINISHED CURMESSAGE WILL HAVE TERM#N\r\n   TermNo = CurMessage[-1,'#']\r\n   end_dialog( @window, TermNo )\r\n   return 0\r\nend\r\n\r\nCurVisible = .answer->visible\r\nCurAnswer  = .answer->value\r\nif ( CurVisible ) then\r\n   * TRYING TO GO FORWARD AND ANSWER IS VISIBLE SO MAKE SURE THEY ANSWERD\r\n   if ( CurAnswer <> '' ) then\r\n      if CurAnswer = 1 then\r\n         NextTier = NextYes\r\n      end else\r\n         NextTier = NextNo\r\n      end\r\n   end else\r\n      MsgInfo = ''\r\n      MsgInfo<mtext$> = 'You must choose Yes or No...'\r\n      MsgInfo<micon$> = 'H'\r\n      Void = msg( '', MsgInfo )\r\n      return 0\r\n   end\r\nend else\r\n   * NEXTYES AND NEXTNO ARE THE SAME CAUSE STATEMENT SO JUST USE YES\r\n   NextTier = NextYes\r\nend\r\nVoid = set_property( @window, '@CurTier', NextTier )\r\n.question_instruction->text = Messages<1,NextTier>\r\n\r\n* PULL OFF ANSWER AND THEN SET TO BLANK FOR NEXT QUESTION\r\nCurTier  = get_property( @window, '@CurTier' )\r\nNextNextPtrs = Pointers<1,CurTier>\r\nNextNextYes  = field( NextNextPtrs, ';', 1 )\r\nNextNextNo   = field( NextNextPtrs, ';', 2 )\r\n\r\n.answer->value = ''\r\nif NextNextYes <> NextNextNo then\r\n   .answer->visible = 1\r\nend else\r\n   * BOTH LINKS ARE EQUAL SO WE ARE AT THE END OR IT IS JUST A STATEMENT\r\n   .answer->visible = 0\r\n   if ( NextNextYes = '' ) and ( NextNextNo = '' ) then\r\n      .next->text = '&Finish'\r\n   end\r\nend\r\n.prev->enabled = 1\r\nRETURN 0"
        }
    }
}