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

bug: can not generate data type with 'string' #314

Open
ibertli opened this issue Apr 13, 2023 · 2 comments
Open

bug: can not generate data type with 'string' #314

ibertli opened this issue Apr 13, 2023 · 2 comments

Comments

@ibertli
Copy link

ibertli commented Apr 13, 2023

hello sir, i find a bug, when i define a data type using 'string' representation, ocarina raise error "Impossible to get the data size of this data", then i check the source code and find that when Data_Representation equals to Data_String, Value_Node was not updated in '../ocarina/src/backends/ast_c/ocarina-backends-c_tree-nutils.adb'. May be you can confirm whether it is a bug.


-- The example like this:
data person_name
properties
Data_Model::Data_Representation => string;
Data_Model::Dimension => (10);
end person_name;

subprogram print_a
features
port2: in parameter person_name;
end print_a;


and the source code like this:


     when Data_String | Data_Wide_String =>
        Value_UUL := Dimension (1);

Thanks for your reply!

@yoogx
Copy link
Contributor

yoogx commented Apr 14, 2023

Thanks for reporting. Yes, this support has never been implemented.
A work-around is to use an array of char.

I will look into implementing this feature when time permits.

@ibertli
Copy link
Author

ibertli commented Apr 17, 2023

Thanks for reporting. Yes, this support has never been implemented. A work-around is to use an array of char.

I will look into implementing this feature when time permits.

got it, wait for the update. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants