Question

I am working on c # but I need to verify if a void type meets...

I am working on c # but I need to verify if a void type meets a condition to follow instructions but I don't know how to do it, I was trying to do it with an if in the following way but it gives me error someone could help me :(

if ((lex.addtoken(analisis.Type.Words_Reserved_Planificador) == true)&&(lex.addtoken(analisis.Type.Symbol_Two_Points)==true))
{

instruccions

}else{

Console.WriteLIne("Error :(");

}

Homework Answers

Answer #1

Please find the following explanation on the given query.

Answer:

When you want to verify whether the function return has any value is, what you can do is simply use "if ((lex.addtoken(analisis.Type.Words_Reserved_Planificador))&&(lex.addtoken(analisis.Type.Symbol_Two_Points)))" by removing true as the return type.

In this case what ever the return type, other than void, it will execute the instructions from if block.

In case of void or 0, it will execute the else block..

if ((lex.addtoken(analisis.Type.Words_Reserved_Planificador))&&(lex.addtoken(analisis.Type.Symbol_Two_Points)))
{

instruccions

}else{

Console.WriteLIne("Error :(");

}

Note: Please provide us the complete program to fix the issues because we didnt get the source code for the program

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
I am working on c # but I need to verify if a void type meets...
I am working on c # but I need to verify if a void type meets a condition to follow instructions but I don't know how to do it, I was trying to do it with an if in the following way but it gives me error someone could help me, or tell me how I can check the condition :( if ((lex.addtoken(analisis.Type.Words_Reserved_Planificador) == true)&&(lex.addtoken(analisis.Type.Symbol_Two_Points)==true)) { //Type is class Enum instruccions } else { Console.WriteLIne("Error :("); }
I am working on a JSON WPF program-C#... I have 2 objects that I am concatenating....
I am working on a JSON WPF program-C#... I have 2 objects that I am concatenating. All I need to know is how to format the first block of code to where the data types match. Here is what I have: I need to take this: A.) { “Name” : “Walder” , “Alias” : “Hodor” , “Alliance” : “House Stark” } and this: B.) { “Name” : “Margaery Tyrell” , “Alias” : [ “The Little Queen”, “The Little Rose”, “Maid...
I am struggling to find the Key Principles, I don't need you to explain them to...
I am struggling to find the Key Principles, I don't need you to explain them to me I just need help finding the 3! In the beginning of the book Republic lies the question of justice. In a theoretical construction of the hypothetical city of Kalipolis, Plato outlines the principles by which a just political society, in his view, could be attained. In your view, what are the THREE key principles? Explain them in short.
MATLAB question and do not change subject. if you dont know skip I need a working...
MATLAB question and do not change subject. if you dont know skip I need a working MATLAB code which will tell me the type of damping which is present in the system. there are 3 types of damping . use if else and give the result. take mass stiffness damping coefficient as input. Dont post wrong answer of i will badly dislike
C Programming: I am working on the problem below and have got all of the code...
C Programming: I am working on the problem below and have got all of the code down, except for one part I can't figure out. The logic for the calculation where the the total at each shop is giving after each iteration of the loop. this is the formula I've got: ingredientPrice += ingredient1; It calculates the total for the first shop properly, but for the shops that follow it gives a cumulative total rather than the singular total for...
Hello! I am coding in c# and I am having trouble using boolean variables and if...
Hello! I am coding in c# and I am having trouble using boolean variables and if statements. The project I am working on is based on the users input, and the code should branch into two different options. However, I am struggling to understand how to take the users input to decide which path to take. Another problem I am having is with my if statements. After the user has inputed information and the code decides to take them down...
I am trying to figure out the correct formula in statistics that I need to use...
I am trying to figure out the correct formula in statistics that I need to use for this question. When you or anyone else attempts to tell me and my associates that 1223 persons account for our opinions and tastes here in America, I get mad as hell! How dare you! When you or anyone else tells me that 1223 people represent America; it is astounding and unfair and should be outlawed. The writer then goes on to claim that...
I am trying to solve the following C++ problem over structures. I am having trouble with...
I am trying to solve the following C++ problem over structures. I am having trouble with the very last structure and I made a comment next to where I am confused. I included the assignment instructions and my current code. I would appreciate if anyone can help me explain what I need to do for the last structure. Thank you. Assignment Instructions Create a program that will prompt me for each of the following items: 1. Date of Birth 2....
Hello, I am working on an assignment but I am unsure of how to solve it....
Hello, I am working on an assignment but I am unsure of how to solve it. Please help me. The assignment details are below. Consider this scenario: Your friend starts a website, nothingbutflags.com, which is not making money. Your friend asks you to help generate more traffic. You ask your friend how much traffic the website had last month? And your friend replies and says only 500 visits. You also ask how many flags did you sell? Your friend replies...
Hello, I am working on a internet marketing/business assignment but I am unsure of how to...
Hello, I am working on a internet marketing/business assignment but I am unsure of how to solve it. Please help me. The assignment details are below. Consider this scenario: Your friend starts a website, nothingbutflags.com, which is not making money. Your friend asks you to help generate more traffic. You ask your friend how much traffic the website had last month? And your friend replies and says only 500 visits. You also ask how many flags did you sell? Your...