Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

echo expression values, treat more things as expressions #7

Open
2 of 4 tasks
lukeasrodgers opened this issue Oct 23, 2015 · 0 comments
Open
2 of 4 tasks

echo expression values, treat more things as expressions #7

lukeasrodgers opened this issue Oct 23, 2015 · 0 comments
Assignees

Comments

@lukeasrodgers
Copy link
Owner

It would be really nice to just type an identifer, and have its value (or some representation of it, for functions/subroutines) echoed, e.g.:

> integer :: a = 1
1
> a
1

Also to treat more things as expressions, and echo their value, e.g.:

> integer :: a = 1
1
> a + 1
2 
> integer :: b, c
> b = 3
3
> c = a + b
4

Could probably get 60% of the way there by: if last statement was an assignment, run the program, write(,) the value of the last assignment; if a statement cannot be classified but we can treat it as an expression, store it in some temp variable, run program, write(,) the value of that temp variable.

  • treat assignments like expressions
  • treat lone variable names as expressions
  • treat declarations/multi-declarations as expressions
  • echo symbol or something for functions, subroutines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant