Skip to content
This repository has been archived by the owner on Feb 4, 2019. It is now read-only.

Advanced Functions #393

Open
andydude opened this issue Sep 23, 2015 · 0 comments
Open

Advanced Functions #393

andydude opened this issue Sep 23, 2015 · 0 comments

Comments

@andydude
Copy link

There are several features that make it impossible to write advanced functions in Pash, such as functions that process records like other Cmdlets can. Among these features are the language features:

  • attributes
  • DynamicParam {...}
  • Begin {...}
  • Process {...}
  • End {...}

For reference, these features are documented by the following PowerShell articles:

An example of a currently failing test case is:

Function Clear-Host
{
    Begin
    {
        [System.Console]::Clear()
    }
}

which currently fails with the error Command 'Begin' not found. It currently works perfectly without the Begin block, but that's not the point. The point is that more advanced features, like Process require these blocks to separate each section of the function.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant