Wednesday, October 31, 2012

Re: What do I need to read to understand g: and s: VIM variable prefixes?

On 31 October 2012 19:15, Dotan Cohen <dotancohen@gmail.com> wrote:
>[…]
> #include <stdio.h>
> int foo();
>
> int main() {
> int x = 42;
> printf("%d", x);
> foo();
> return 0;
> }
>
> int foo() {
> printf("%d", x);
> }
>[…]
Here x is a local variable of the function *main*.
I think the "global" keyword is more of a weirdism of PHP than
standard practise.
http://en.wikipedia.org/wiki/Global_variable#C_and_C.2B.2B

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment