Does anyone know C and GCBASIC?
![james789](https://simulide.com/p/core/modules/2c3734368b/assets/img/default_avatar.jpg)
Quote from james789 on March 27, 2024, 10:14 pmAs we can see, it does the same thing on another version. It looks like it's a bug. Couldn't we fix it so that it still works?It's very confusing for the user.
![](https://simulide.com/p/storage/userfiles/james789/posts/202403271711577757.png)
![arcachofo](https://simulide.com/p/storage/ultimatemember/2/profile_photo-80x80.png?1725757346)
Quote from arcachofo on March 28, 2024, 6:33 amMaybe it doesn't work as you expect, the idea is that you uderstand how it actually works.
Variables are found during compilation, if you run the simulation without compiling the location of the variables is unknown.
That also depends on the compiler, finding variables might work better for some compilers and worse for others.Version 1.0.0 is a bit more "clunky", 1.1.0 works better.
Maybe it doesn't work as you expect, the idea is that you uderstand how it actually works.
Variables are found during compilation, if you run the simulation without compiling the location of the variables is unknown.
That also depends on the compiler, finding variables might work better for some compilers and worse for others.
Version 1.0.0 is a bit more "clunky", 1.1.0 works better.
![james789](https://simulide.com/p/core/modules/2c3734368b/assets/img/default_avatar.jpg)
Quote from james789 on April 2, 2024, 3:22 pmHere's what i do:
choose Sender as Main MCU
open Sender.gcb
compile
import
open mcu monitor : wkey(8), key(16), i ,j are empty
run
i, j are found but not wkey(8) and key(16)
Same with Simulide 1.1.0 :
Here's what i do:
choose Sender as Main MCU
open Sender.gcb
compile
import
open mcu monitor : wkey(8), key(16), i ,j are empty
run
i, j are found but not wkey(8) and key(16)
Same with Simulide 1.1.0 :
![arcachofo](https://simulide.com/p/storage/ultimatemember/2/profile_photo-80x80.png?1725757346)
Quote from arcachofo on April 2, 2024, 4:52 pmHere is what you can do instead:
1- Open circuit and gcb file.
2- Declare i and j individually: https://simulide.com/p/forum/topic/does-anyone-know-c-and-gcbasic/#postid-856
3- In Mcu Montor use key and wkey: https://simulide.com/p/forum/topic/does-anyone-know-c-and-gcbasic/#postid-856
But that is only useful to know the address.
To watch arrays values use the RAM table.
4- Upload.
Here is what you can do instead:
1- Open circuit and gcb file.
2- Declare i and j individually: https://simulide.com/p/forum/topic/does-anyone-know-c-and-gcbasic/#postid-856
3- In Mcu Montor use key and wkey: https://simulide.com/p/forum/topic/does-anyone-know-c-and-gcbasic/#postid-856
But that is only useful to know the address.
To watch arrays values use the RAM table.
4- Upload.
![james789](https://simulide.com/p/core/modules/2c3734368b/assets/img/default_avatar.jpg)
Quote from james789 on April 2, 2024, 7:56 pmThank you very much I can finally get it to work.But wouldn't it be possible to simplify the user experience for future versions?for example, as soon as you open the MCU monitor:Alert message that says "alert compilation did not take place, the location of the variables are not known"?Or "The compilation didn't happen, do you want to compile and upload? (don't forget to choose de main MCU before)"And for variables to be added declare individually, can't this be fixed as a bug and the user doesn't have to do it anymore?Because it's just a very small thing but I guess if these two problems exist, there must be plenty of other things of the same type that are going to be a problem for the user?
![james789](https://simulide.com/p/core/modules/2c3734368b/assets/img/default_avatar.jpg)
Quote from james789 on April 3, 2024, 2:05 pmHello,
I've another question :
if i do:
wkey(5)=0xf7f8
the variable is in memory :
but if i do :
i=5
wkey(i)=0xf7f8
the variable is not in memory, why ?
Hello,
I've another question :
if i do:
wkey(5)=0xf7f8
the variable is in memory :
but if i do :
i=5
wkey(i)=0xf7f8
the variable is not in memory, why ?
![arcachofo](https://simulide.com/p/storage/ultimatemember/2/profile_photo-80x80.png?1725757346)
Quote from arcachofo on April 3, 2024, 7:25 pmbut if i do :
i=5
wkey(i)=0xf7f8the variable is not in memory, why ?
That is weird...
This could be an actual bug, I will have a look.
but if i do :
i=5
wkey(i)=0xf7f8the variable is not in memory, why ?
That is weird...
This could be an actual bug, I will have a look.
![james789](https://simulide.com/p/core/modules/2c3734368b/assets/img/default_avatar.jpg)
Quote from james789 on April 4, 2024, 12:18 amIf this is a bug, this could explain why this doesn't work :
key = 0xD4,0xB7,0xE3,0xE8,0x88,0x4C,0x3C,0x54,0x95,0x3F,0x71,0xAA,0x42,0x75,0xBA,0xD1
same kind of bug (increment problem)
If this is a bug, this could explain why this doesn't work :
key = 0xD4,0xB7,0xE3,0xE8,0x88,0x4C,0x3C,0x54,0x95,0x3F,0x71,0xAA,0x42,0x75,0xBA,0xD1
same kind of bug (increment problem)
![james789](https://simulide.com/p/core/modules/2c3734368b/assets/img/default_avatar.jpg)
![arcachofo](https://simulide.com/p/storage/ultimatemember/2/profile_photo-80x80.png?1725757346)