本文介绍了有人可以确切地解释一下以下定义在C标准中关于指令的含义吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我真正需要知道的是在指令开始之前允许使用哪些字符,因为我们都知道在开始之前可以有换行和空白字符指令(在#之前)的内容,现在我阅读了有关此内容的C标准,并找到了解释此内容的以下定义:现在我真正需要知道的是:他们是什么意思 the 和在上面的定义中我不理解,我需要知道它的确切含义,并且我需要知道解决方案这基本上意味着:#在行的开头,或者给定行上#之前只有空格./p>此部分:如果#在文件的第一行,则允许在#之前的空格,而在此部分:在任何后续行中都允许在#之前的空格.例如: #include <stdio.h> // spaces before the first line #include <stdlib.h> // spaces before another line, i.e, spaces and newline before a tokenint x; #include <string.h> // not allowed, other tokens preceed on same lineWhat i exactly need to know is what characters are allowed before the start of a directive as we all know we can have new line characters and whitespace characters before the start of a directive before ( # ) now i read the C standard about this and found out the following definition explaining this:now what i exactly need to know is:what do they mean bytheandis what i don't understand in the above definition i need to know what that exactly means and i need to know 解决方案 What this all basically means is that either # is at the start of a line or there is only whitespace before # on a given line.This part:Allows for whitespace before # if it's on the first line of the file, while this part:Allows for whitespace before # on any subsequent line.For example: #include <stdio.h> // spaces before the first line #include <stdlib.h> // spaces before another line, i.e, spaces and newline before a tokenint x; #include <string.h> // not allowed, other tokens preceed on same line 这篇关于有人可以确切地解释一下以下定义在C标准中关于指令的含义吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 17:24