logo
  • 教程列表
  • SO官方文檔
  • PowerShell 中的返回行為
    • 提前退出
    • Gotcha 返回管道
    • 返回值
    • 陷阱忽略不需要的輸出
    • 如何使用函式返回
  1. StackOverflow 文件
  2. PowerShell 教程
  3. PowerShell 中的返回行為
  4. 返回值

返回值

Created: November-22, 2018

(從 about_return 轉述 )

以下方法在管道上具有相同的值

function foo {
    $a = "Hello"
    return $a
}

function bar {
    $a = "Hello"
    $a
    return
} 

function quux {
    $a = "Hello"
    $a
} 
  • 陷阱忽略不需要的輸出
  • Gotcha 返回管道

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明