programming-languages

Can somebody walk me through what this question is trying to ask of me?

自闭症网瘾萝莉.ら 提交于 2020-02-25 16:57:11
问题 The following programming languages question seems really unclear and what it wants me to do is not obvious to me, could somebody help me to understand it? The question: Implement part of a recursive descent parser for a simple set of language rules. Use any programming language for the implementation; if it isn’t a common language, please make a note of which language it is in a comment. You should implement functions for each of the nonterminal symbols and, using the following rules that

Can somebody walk me through what this question is trying to ask of me?

谁说胖子不能爱 提交于 2020-02-25 16:56:33
问题 The following programming languages question seems really unclear and what it wants me to do is not obvious to me, could somebody help me to understand it? The question: Implement part of a recursive descent parser for a simple set of language rules. Use any programming language for the implementation; if it isn’t a common language, please make a note of which language it is in a comment. You should implement functions for each of the nonterminal symbols and, using the following rules that

Can somebody walk me through what this question is trying to ask of me?

好久不见. 提交于 2020-02-25 16:53:07
问题 The following programming languages question seems really unclear and what it wants me to do is not obvious to me, could somebody help me to understand it? The question: Implement part of a recursive descent parser for a simple set of language rules. Use any programming language for the implementation; if it isn’t a common language, please make a note of which language it is in a comment. You should implement functions for each of the nonterminal symbols and, using the following rules that

Are all programming languages read in sequential order?

て烟熏妆下的殇ゞ 提交于 2020-02-21 13:47:40
问题 I can't seem to find a direct answer on this. Using several search engines gives me very vague results, or only answers half the question. So, to elaborate, when you write a program and it's compiled/interpreted, does the computer read each line sequentially in chronological order or does it skip around by default? Example: Using C-style source because it was the first thing that came to mind. printf("I'm the first line of your program! Yay!"); printf("I'm the second, woo!"); printf("And I'm

Are all programming languages read in sequential order?

三世轮回 提交于 2020-02-21 13:47:32
问题 I can't seem to find a direct answer on this. Using several search engines gives me very vague results, or only answers half the question. So, to elaborate, when you write a program and it's compiled/interpreted, does the computer read each line sequentially in chronological order or does it skip around by default? Example: Using C-style source because it was the first thing that came to mind. printf("I'm the first line of your program! Yay!"); printf("I'm the second, woo!"); printf("And I'm

Which programming languages, other than C++, support operator overloading?

こ雲淡風輕ζ 提交于 2020-02-21 13:00:08
问题 I know C++. Anything other? 回答1: Wikipedia's article on Operator Overloading features a list of languages that support it. 回答2: I'm amused thinking about it. Any C compiler for example, must tell between an int *c; and double d = (int) f * (float) g; . In the former case, * indicates c is a pointer to int while in the latter case it is a multiplication operator. Though not exported outside the compiler itself, C appears to have operator overloading feature. C++ exported it outside the

Which programming languages, other than C++, support operator overloading?

痴心易碎 提交于 2020-02-21 12:59:11
问题 I know C++. Anything other? 回答1: Wikipedia's article on Operator Overloading features a list of languages that support it. 回答2: I'm amused thinking about it. Any C compiler for example, must tell between an int *c; and double d = (int) f * (float) g; . In the former case, * indicates c is a pointer to int while in the latter case it is a multiplication operator. Though not exported outside the compiler itself, C appears to have operator overloading feature. C++ exported it outside the

Which programming languages, other than C++, support operator overloading?

白昼怎懂夜的黑 提交于 2020-02-21 12:57:38
问题 I know C++. Anything other? 回答1: Wikipedia's article on Operator Overloading features a list of languages that support it. 回答2: I'm amused thinking about it. Any C compiler for example, must tell between an int *c; and double d = (int) f * (float) g; . In the former case, * indicates c is a pointer to int while in the latter case it is a multiplication operator. Though not exported outside the compiler itself, C appears to have operator overloading feature. C++ exported it outside the

Which programming languages, other than C++, support operator overloading?

天大地大妈咪最大 提交于 2020-02-21 12:55:39
问题 I know C++. Anything other? 回答1: Wikipedia's article on Operator Overloading features a list of languages that support it. 回答2: I'm amused thinking about it. Any C compiler for example, must tell between an int *c; and double d = (int) f * (float) g; . In the former case, * indicates c is a pointer to int while in the latter case it is a multiplication operator. Though not exported outside the compiler itself, C appears to have operator overloading feature. C++ exported it outside the

Tail recursion in SML does not present any output

元气小坏坏 提交于 2020-01-25 07:31:06
问题 Following my previous post here , I tried to do what was suggested and convert the code into a Tail-recursion method with let . The original code - which does not work (due to using val inside if condition) : fun func() = val decimal = 0 (* the final result *) val multiple = 0 (* keeps track of multiples, eg. In XXV, X would be a multiple *) val current = 0 (* the digit currently being processed *) val top = 0 (* value of the last element in the list *) val last_add = 0 (* the last digit that