using double everywhere
This commit is contained in:
@@ -88,28 +88,22 @@ int main(int ac, char **av)
|
||||
|
||||
if (tokens[i].type == TOKEN_VARIABLE)
|
||||
ft_printf("%20s", "TOKEN_VARIABLE");
|
||||
if (tokens[i].type == TOKEN_NUMBER_INT)
|
||||
ft_printf("%20s", "TOKEN_NUMBER_INT");
|
||||
if (tokens[i].type == TOKEN_NUMBER_DOUBLE)
|
||||
ft_printf("%20s", "TOKEN_NUMBER_DOUBLE");
|
||||
if (tokens[i].type == TOKEN_POWER)
|
||||
else if (tokens[i].type == TOKEN_NUMBER)
|
||||
ft_printf("%20s", "TOKEN_NUMBER");
|
||||
else if (tokens[i].type == TOKEN_POWER)
|
||||
ft_printf("%20s", "TOKEN_POWER");
|
||||
if (tokens[i].type == TOKEN_SIGN)
|
||||
else if (tokens[i].type == TOKEN_SIGN)
|
||||
ft_printf("%20s", "TOKEN_SIGN");
|
||||
if (tokens[i].type == TOKEN_FACTOR)
|
||||
else if (tokens[i].type == TOKEN_FACTOR)
|
||||
ft_printf("%20s", "TOKEN_FACTOR");
|
||||
if (tokens[i].type == TOKEN_EQUAL)
|
||||
else if (tokens[i].type == TOKEN_EQUAL)
|
||||
ft_printf("%20s", "TOKEN_EQUAL");
|
||||
if (tokens[i].type == TOKEN_END)
|
||||
else if (tokens[i].type == TOKEN_END)
|
||||
ft_printf("%20s", "TOKEN_END");
|
||||
|
||||
ft_putstr(" - value : ");
|
||||
|
||||
if (tokens[i].type == TOKEN_NUMBER_INT)
|
||||
{
|
||||
printf("%i\n", tokens[i].value_int);
|
||||
}
|
||||
else if (tokens[i].type == TOKEN_NUMBER_DOUBLE)
|
||||
if (tokens[i].type == TOKEN_NUMBER)
|
||||
{
|
||||
printf("%g\n", tokens[i].value_double);
|
||||
}
|
||||
@@ -129,7 +123,7 @@ int main(int ac, char **av)
|
||||
ft_putchar('\n'); // debug
|
||||
|
||||
term terms[terms_count_prediction];
|
||||
int term_count = parse(tokens, terms);
|
||||
int term_count = parse(tokens, terms, terms_count_prediction);
|
||||
|
||||
ft_putstr("-> terms_count : "); // debug
|
||||
ft_putnbr(term_count); // debug
|
||||
|
||||
Reference in New Issue
Block a user