components/blockly-src/blocks/procedures.js
function() {
    this.appendValueInput('CONDITION')
        .setCheck('Boolean')
        .appendField(Blockly.Msg.CONTROLS_IF_MSG_IF);
    this.appendValueInput('VALUE')
        .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);
    this.setInputsInline(true);
    this.setPreviousStatement(true);
    this.setNextStatement(true);
    this.setColour(Blockly.Blocks.procedures.HUE);
    this.setTooltip(Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP);
    this.setHelpUrl(Blockly.Msg.PROCEDURES_IFRETURN_HELPURL);
    this.hasReturnValue_ = true;
  }
function() {
    this.appendValueInput('CONDITION')
        .setCheck('Boolean')
        .appendField(Blockly.Msg.CONTROLS_IF_MSG_IF);
    this.appendValueInput('VALUE')
        .appendField(Blockly.Msg.PROCEDURES_DEFRETURN_RETURN);
    this.setInputsInline(true);
    this.setPreviousStatement(true);
    this.setNextStatement(true);
    this.setColour(Blockly.Blocks.procedures.HUE);
    this.setTooltip(Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP);
    this.setHelpUrl(Blockly.Msg.PROCEDURES_IFRETURN_HELPURL);
    this.hasReturnValue_ = true;
  }
function ( ) { this . appendValueInput ( 'CONDITION' ) . setCheck ( 'Boolean' ) . appendField ( Blockly . Msg . CONTROLS_IF_MSG_IF ) ; this . appendValueInput ( 'VALUE' ) . appendField ( Blockly . Msg . PROCEDURES_DEFRETURN_RETURN ) ; this . setInputsInline ( true ) ; this . setPreviousStatement ( true ) ; this . setNextStatement ( true ) ; this . setColour ( Blockly . Blocks . procedures . HUE ) ; this . setTooltip ( Blockly . Msg . PROCEDURES_IFRETURN_TOOLTIP ) ; this . setHelpUrl ( Blockly . Msg . PROCEDURES_IFRETURN_HELPURL ) ; this . hasReturnValue_ = true ; }
Block for conditionally returning a value from a procedure.
@this Blockly.Block
Block for conditionally returning a value from a procedure .