Last active
January 2, 2016 19:09
-
-
Save glorphindale/8348423 to your computer and use it in GitHub Desktop.
Значащие отступы
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Python | |
def func(arg1, arg2): | |
count = size(arg1) + size(arg2) | |
print count | |
print arg1 | |
// C | |
int func(string arg1, string arg2) { | |
int count = arg1.size() + arg2.size(); | |
printf("%d", count); | |
printf("%s", arg1); | |
} | |
// Никто не пишет на С++ вот так | |
int func(string arg1, string arg2) { | |
int count = arg1.size() + arg2.size(); | |
printf("%d", count); | |
printf("%s", arg1); | |
} | |
// Или так | |
func(string arg1, string arg2) { | |
int count = arg1.size() + arg2.size(); | |
// Важная строка, выделим отступом | |
printf("%d", count); | |
printf("%s", arg1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment