V Forum

[ log in ]

Globals and C translation

vktec 2019-06-21 08:48
It's my understanding that V doesn't allow global variables. However, many C programs use globals, either because the programmer was too lazy to do it differently or because the APIs used require the use of globals. How does the automatic C->V translator handle this?
medvednikov 2019-06-21 14:48
V allows them only in translated code, no way around it.
medvednikov 2019-06-21 14:49
V knows that the code has been translated. Right now it is specified with a flag.
vktec 2019-06-21 21:19
Oh, that's an interesting workaround. So if the flag was specified manually, it would be possible to use globals?



Powered by Vorum, open-source blogging/forum software written in V