变量名的语法跨越C中的多行 [英] Syntax for variable names spanning multiple lines in C

查看:62
本文介绍了变量名的语法跨越C中的多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有兴趣知道是否有办法在C中的多行使用变量名分割




。对于例如:


INT this_is_a_very_long_variable_name = 10;


我想分裂" this_is_a_very_long_variable_name "进入2

行 - 让我们说this_is_a_在第一行和

" very_long_variable_name"在第二行。


这可能在语法上用C吗?


我尝试使用反斜杠操作符是徒劳的:


int this_is_a_ \

very_long_variable_name = 10;


上面给出了编译错误。


如果有的话,请提供相应的方法。


谢谢,

Sriram。

Hi,

I was interested to know if there is a way to use a variable name split
across multiple lines in C.

For example :

int this_is_a_very_long_variable_name = 10;

I would like to split the "this_is_a_very_long_variable_name " into 2
lines - lets say "this_is_a_" in the first line and
"very_long_variable_name " in the second line.

Is this possible syntactically in C?

I tried using the backslash operator in vain :

int this_is_a_\
very_long_variable_name = 10;

The above gives a compilation error.

Please suggest the means to do this if there is any.

Thanks,
Sriram.

推荐答案

Sriram Rajagopalan写道:
Sriram Rajagopalan wrote:

我有兴趣知道是否有办法使用变量名分开

跨越C中的多行。
I was interested to know if there is a way to use a variable name split
across multiple lines in C.



没有。


我我很好奇你正在做什么需要这个。


-

Chris" hantwig efferko VOOM! Dollin

你是谁?你想要什么? / Babylon 5 /

There isn''t.

I''m curious as to what you''re doing that needs this.

--
Chris "hantwig efferko VOOM!" Dollin
"Who are you? What do you want?" /Babylon 5/


Hello Sriram,
Hello Sriram,

我有兴趣知道是否有一种使用变量名称的方法在C中的多行中分割




例如:


int this_is_a_very_long_variable_name = 10;


我想拆分this_is_a_very_long_variable_name"进入2

行 - 让我们说this_is_a_在第一行和

" very_long_variable_name"在第二行。


这可能在语法上用C吗?


我尝试使用反斜杠操作符是徒劳的:


int this_is_a_ \

very_long_variable_name = 10;
I was interested to know if there is a way to use a variable name split
across multiple lines in C.

For example :

int this_is_a_very_long_variable_name = 10;

I would like to split the "this_is_a_very_long_variable_name " into 2
lines - lets say "this_is_a_" in the first line and
"very_long_variable_name " in the second line.

Is this possible syntactically in C?

I tried using the backslash operator in vain :

int this_is_a_\
very_long_variable_name = 10;



在\\ _

之后,不要在very_long_name之前放置任何空白或标签,不要放任何空格或标签;


ex:

int this_is_a_\

very_long_variable_name = 10;


HTH,

Loic。

don''t put any blank or tab after the \
don''t put any blank or tab before "very_long_name"

ex:
int this_is_a_\
very_long_variable_name = 10;

HTH,
Loic.


2006-11-13< 11 ********** ************@b28g2000cwb.googlegroups .com> ;,

Sriram Rajagopalan写道:
2006-11-13 <11**********************@b28g2000cwb.googlegroups .com>,
Sriram Rajagopalan wrote:




我有兴趣知道是否有办法在C中的多行使用变量名分割




。对于例如:


INT this_is_a_very_long_variable_name = 10;


我想分裂" this_is_a_very_long_variable_name"进入2

行 - 让我们说this_is_a_在第一行和

" very_long_variable_name"在第二行。


这可能在语法上用C吗?


我尝试使用反斜杠操作符是徒劳的:


int this_is_a_ \

very_long_variable_name = 10;


上面给出了编译错误。
Hi,

I was interested to know if there is a way to use a variable name split
across multiple lines in C.

For example :

int this_is_a_very_long_variable_name = 10;

I would like to split the "this_is_a_very_long_variable_name " into 2
lines - lets say "this_is_a_" in the first line and
"very_long_variable_name " in the second line.

Is this possible syntactically in C?

I tried using the backslash operator in vain :

int this_is_a_\
very_long_variable_name = 10;

The above gives a compilation error.



int this_is_a_ \

very_long_variable_name


尝试时不允许缩进在
中间拆分一个令牌,因为\在换行后不会吃除

以外的任何空格。

int this_is_a_\
very_long_variable_name

No indentation is permitted when you are attempting to split a token in
the middle, since \ does not eat any whitespace other than the
immediately following newline.


这篇关于变量名的语法跨越C中的多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆