Lartu / ldpl

COBOL-like programming language that compiles to C++. With serious dinosaurs with neckties and briefcases 🦕💼
https://www.ldpl-lang.org/
Apache License 2.0
161 stars 24 forks source link

The last vector index must be an expression #80

Closed dgarroDC closed 5 years ago

dgarroDC commented 5 years ago

is_vector_index wan't working correctly, it allowed using anything except vector variables as the last index, so you could do something like this (the error would be found on the C++ compiling phase):

DATA:
v is number vector

PROCEDURE:
display v:coso

In the process of fixing it I made a lot of changes. I deleted is_vector_index, split_vector now returns two parts (the vector and the index) and get_c_variable is simpler.

Lartu commented 5 years ago

Awesome! Great that you could make it simpler. Merging it right now.

Thank you very much! :confetti_ball: