Conditional return statement


Proposal Editing Information

  • Who Updates: JimLewis, PatrickLehmann, <Add YourName >, ...
  • Date Proposed: 2012-08-19
  • Date Last Updated: 2016-02-19
  • Priority:
  • Complexity:
  • Focus: Testbench

Requirement Summary

Conditional return statement

Related and/or Competing Issues: none

Use Model

return (Data'range => 'U') when MemArrayPtr = NULL;


return (<expression 1>) when <condition 1> else
       (<expression 2>) when <condition 2> else
       (<expression N>); -- JonnyDoin - 2013-01-03

Proposal

Questions

General Comments

This conditional return mechanism is useful for synthesis, not only for testbench use. -- JonnyDoin - 2013-01-03

VHDL has already conditional loop control statements:
- next [when condition];
- exit [when condition];
It's just fair to add conditional return statements, too.

-- PatrickLehmann - 2016-02-18

Supporters

-- JonnyDoin - 2013-01-03

-- PatrickLehmann - 2016-02-18

Add your signature here to indicate your support for the proposal

Topic revision: r4 - 2020-02-17 - 15:34:28 - JimLewis
 
Copyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback