Use this tag for questions about entry points to executables (programs); e.g., the "main()" function in most programming languages. If your question is programming language specific, tag that: language as well e.g. C, C++, Java etc.
Questions tagged [program-entry-point]
2997 questions
0
votes
1 answer
Vba Macro works but not starting in main()
Have created a Macro - multiple subs, functions and forms for Solidworks.
I'm sure the code is dubious but it works when I force it to start in main()
When I add a button in Solidworks to start the macro it defaults to a different sub, which appears…

Floggedhorse
- 694
- 8
- 15
0
votes
1 answer
Create Main class in AS2?
I know that in AS3 I can create a Main class and link it to the FLA file. I tried doing the same in AS2 but couldn't. (When I try linking the fla to a class, it says the feature only exists in AS3)
Can I link the FLA to a class in some other way? If…

Itamar Marom
- 525
- 8
- 21
0
votes
1 answer
Using argparse scripts along with larger project
My objective is to use argparse command-line script along with a larger project. Especially I want to use some models from my project inside argparse_command.py.
Let's say the project structure is as follows:
myproject/
├── app
│ ├── db.py
│ └──…

prze gee
- 61
- 4
0
votes
2 answers
'InterfaceContainer' object has no attribute 'WethInterface'
from brownie import accounts, config, network, interface
def main():
"""
Runs the get_weth function to get WETH
"""
get_weth()
def get_weth(account=None):
"""
Mints WETH by depositing ETH.
"""
account = (
account if account else…

Abed ja'fari
- 1
- 2
0
votes
1 answer
Can I catch all exceptions by using try and catch in "__main__"
Is it possible too catch all exceptions if I use try except block in "main"? I tried catching the exception but I can't. I have attached exception image along with code
enter code here
if __name__ == '__main__':
try:
app =…

Paul Jose
- 13
- 4
0
votes
2 answers
Why is it necessary to import Scanner in both main and separate class?
I created a basic calculator program using two classes, Main and Calculator. One of my methods in the Calculator class takes in a Scanner object as its parameter. I tried to delete the Scanner import from this class but IntelliJ puts it back…

maltuin
- 11
- 4
0
votes
1 answer
Swift: How to call a method located in ViewController from @main located in AppDelegate?
I´m new to Swift and struggling with the entry point.
Used versions: Swift 5.5.2 +
IOS 15.3.1
I´ve created a method in ViewController which simply should show a word in a label. This method have to be called from a main function. According to my…

diniska
- 3
- 1
0
votes
1 answer
Can the main function be declared before is defined?
I know that the main function is just a "special" function, but can it be declared and then defined like any other function or not?
This is also correct :
int main(void);
int main(void) {
}
or just this is correct :
int main(void) {
}
?
P.S. I…

ciapi1369
- 55
- 4
0
votes
0 answers
can we put const in for loop condtion list for( const auto &test : TestList), like this. where TestList is the structure Array. please explain code?
int main(int argc, char**argv)
{
if (argc<2)
goto invokeError;
for (int i=1; i

mohrafik
- 26
- 2
0
votes
3 answers
Dart Main File (and other essential files) Not Created In New Project
I am learning dart/flutter using InetlliJ, and when I go to create a new dart project, it only creates a few useless files. No main.dart. I have all the most recent versions of flutter and dart installed.
enter image description here

Patrick Sweet
- 21
- 2
0
votes
1 answer
C++ different values in local function vs main function
I'm trying to write a function that parses a file including a 2d array size 2x2 (first line of file has the first row, second line has the second row) then an empty space, then values to be put in a vector, then an empty space, then an integer…
user8928280
0
votes
1 answer
No class Main class found . Smoke testing
I did the application and it said that there was no main.java. Is there any I can fix this?
package test.cases.business;
import model.business.Customer;
public class CustomerTest {
//=======================================
//Smoke Tests -…

user16284724
- 15
- 3
0
votes
1 answer
What does each of these `const`s mean?
Normally people write the main function like this:
int main( int argc, char** argv )
However, this came to my mind:
int main( const int argc, const char* const* const argv )
or maybe I should write it like this cause it seems more intuitive:
int…

digito_evo
- 3,216
- 2
- 14
- 42
0
votes
1 answer
Python - Using main function instead of CMD - separating argparse
I'm currently trying to run a python script by calling the main function in a different python file.
The script opens up a file, refreshes it and publishes it.
I'm looking at refreshing multiple files (so essentially calling the main function…

David Gorgan
- 31
- 9
0
votes
0 answers
How wait() works in main() method?
I have created a main thread with two additional threads. When I use wait() in the main method with an object ( because wait() is an instance of the object and cannot be used directly in an instance of a class ) of one thread ( t1.wait() ). Both…

VinayGowda
- 155
- 2
- 12