什么是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"
}

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }

 

找到定义如下:

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

时间: 2024-08-24 19:26:57

什么是automatic variable?的相关文章

Python中变量的作用域(variable scope)

http://www.crifan.com/summary_python_variable_effective_scope/ 解释python中变量的作用域 示例: 1.代码版 1 #!/usr/bin/python 2 # -*- coding: utf-8 -*- 3 """ 4 ------------------------------------------------------------------------------- 5 Function: 6 [整理

memory models and namespace

继续<C++ premier plus > 先来解释一下scope和linkage,所谓scope,是指变量的作用范围,所谓linkage,是指变量能否在不同文件中共享 1,自动变量(automatic variable),local scope, no linkage 函数的参数,函数内定义的变量(未使用static限定),以及语句块中定义的变量,均为自动变量,自动变量具有local scope,即局部作用域,只在定义的函数或者块中起作用,当程序执行离开某个函数或区块时,其中的自动变量被释放

Makefile中的函数

Makefile 中的函数 Makefile 中自带了一些函数, 利用这些函数可以简化 Makefile 的编写. 函数调用语法如下: $(<function> <arguments>) # 或者 ${<function> <arguments>} <function> 是函数名 <arguments> 是函数参数 1.1 字符串函数 字符串替换函数: $(subst <from>,<to>,<text&

iOS -- warnings

Semantic Warnings Warning Message -WCFString-literal input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 -WNSObject-attribute         __attribute ((NSObject)) may be put on a typedef only, attribute is ignore

IOS 警告 收集

Semantic Warnings Warning Message -WCFString-literal input conversion stopped due to an input byte that does not belong to the input codeset UTF-8 -WNSObject-attribute __attribute ((NSObject)) may be put on a typedef only, attribute is ignored -Wabst

UNIX高级环境编程(9)进程控制(Process Control)- fork,vfork,僵尸进程,wait和waitpid

本章包含内容有: 创建新进程 程序执行(program execution) 进程终止(process termination) 进程的各种ID ? 1 进程标识符(Process Identifiers) 每个进程都有一个唯一的标识符,进程ID(process ID). 进程的ID是可重用的,如果一个进程被终止,那么它的进程ID会被系统回收,但是会延迟使用,防止该进程ID标识的新进程被误认为是以前的进程. 三个特殊ID的进程: Process ID 0:调度者进程,内核进程. Process

TIJ英文原版书籍阅读之旅——Chapter Two:Everything Is an Object

If we spoke a different language, we would perceive a somewhat different world. Ludwig Wittgenstein(1889-1951) You manipulate objects with references Although you treat everything as an object, the identifier you manipulate is actually "reference&quo

Linux Shell常用函数

Functions for Transforming Text Functions allow you to do text processing in the makefile to compute the files to operate on or the commands to use. You use a function in a function call, where you give the name of the function and some text (the arg

exit()与_exit()函数的区别(Linux系统中)

注:exit()就是退出,传入的参数是程序退出时的状态码,0表示正常退出,其他表示非正常退出,一般都用-1或者1,标准C里有EXIT_SUCCESS和EXIT_FAILURE两个宏,用exit(EXIT_SUCCESS);可读性比较好一点. 作为系统调用而言,_exit和exit是一对孪生兄弟,它们究竟相似到什么程度,我们可以从Linux的源码中找到答案: #define __NR__exit __NR_exit /* 摘自文件include/asm-i386/unistd.h第334行 */