zoukankan      html  css  js  c++  java
  • 什么是automatic variable?

    看代码符号$?搞不清楚是什么?

     

    看代码.

    $share = Get-WmiObject -Class Win32_Share -ComputerName $Server.name -Credential $credentials -Filter "Description='Default share'"
    
    if($?)
    {
       "command succeeded"
       $share | Foreach-Object {...}
    }
    else
    {
       "command failed"
    }

     

    找到定义如下:

    Contains the execution status of the last operation. It contains TRUE if the last operation succeeded and FALSE if it failed.

     

    Reference

    ==================

    about_Automatic_Variables

    https://technet.microsoft.com/en-us/library/hh847768.aspx

  • 相关阅读:
    链表的相关操作
    【回溯】旅行商问题
    【回溯】图的m着色问题
    奶牛卧室_待解决
    阶乘问题
    子数整数
    hihoCoder week4 Trie图
    hihoCoder week3 KMP算法
    hihoCoder week2 Trie树
    hihoCoder week1 最长回文子串
  • 原文地址:https://www.cnblogs.com/awpatp/p/5773465.html
Copyright © 2011-2022 走看看