This is just a general question about programming, it doesn't refer to Gambas specifically, but I would implement the results in Gambas.
For some of my bigger projects I have had to implement IF and ELSE and similar functions. I tried to manage AND, OR etc. too, but I failed. Somehow I didn't find a proper way of implementing this logic. So up to now I have filled this gap by simply putting several IF ELSE IF ELSE and so on within each other. Of course this is somewhat tricky sometimes :-) Could someone here explain me how an AND and an OR can be implemented? Are there general rules? I do not need the parser, it is there. I just ask about the logic behind AND and OR for instance. Here are my thoughts so far: - Parser puts IF-clauses into array and logic (AND/OR) in between or into separate list - IF-clauses are solved and results are stored e. g. in a boolean array - The ANDs and ORs from the list are processed with the boolean array into a final result This does not, however, include looking for bracketed clauses... Oh my goodness :-) Thanks for your help... Regards Rolf ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
