685 questions
2 votes
1 answer
175 views
What is the difference between alias `our` and the original global variable?
This is one question encountered while reading the answer of this QA (as ikegami's comment says, how subroutine foo works is complicated. IMHO that may be due to using one outside variable): sub foo { ...
0 votes
2 answers
86 views
Declaration Statement Format Difference
I'm a beginner learning C programming and I'm wondering the difference between these two formats and why one works and the other does not: // this one doesn't work #include <stdio.h> int main(...
1 vote
3 answers
94 views
How can I use a declaration pattern outside of an if condition?
I'm trying to use declaration patterns as described here: https://learn.microsoft.com/dotnet/csharp/language-reference/operators/patterns#declaration-and-type-patterns I can see that the examples only ...
-4 votes
1 answer
68 views
Why doesn't this C++ code cause a conflicting declaration error? [duplicate]
Why doesn't the two different declarations of the variable 't' within the same function cause a conflicting declaration error? (Because it doesn't). Can this way of using the same name for a variable ...
2 votes
0 answers
124 views
Writing a compiler frontend. When should I check if a variable was declared or not?
I'm currently writing a compiler in C for my own programming language. Now I'm working on the front-end. I've added functions recently, and now I have troubles with checking if a variable was declared ...
2 votes
1 answer
143 views
Inline variables aren't working in TMS Web Core
When I try to use an inline variable, then I get a Syntax error. Here's my code: procedure TfrmMain.btnSignInClick(Sender: TObject); begin var UserEmail := edtEmail.Text; var UserPassword := ...
2 votes
2 answers
137 views
Can I declare an array of integers in JSON without listing each element explicitly?
I want a JSON array to contain all integers between 0 and 1000, but I don’t want to declare each element of that very long array individually. Is there a more economical/elegant way to declare that ...
1 vote
0 answers
35 views
Can't pass lat, lng to weatherbit API, ReferenceError: data is not defined
I'm really struggling with my final project for my first ever coding course. Situation: I'm able to successfully retrieve data from Geonames API, that looks like this: Geonames API response: { lat: ...