Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

How to goto lable with plantUML

I want to create an Activity Diagram with PlantUML I`ve got an issue, can't connect to label, current code as follow: @startuml skinparam conditionStyle Insidediamond title **...
user23267295's user avatar
0 votes
2 answers
56 views

BAT script to check for multiple files individually else goto 1, 2, etc

I need to be able to check the Public Desktop for file1*, then, if found, exit normally. If file1* is not found, I need it to check for file2*, then, if found, exit normally. If neither file is found, ...
Michael W's user avatar
0 votes
3 answers
146 views

Is there an better/efficient way to keep asking for user input from STDIN using fgets() in C?

#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAXSIZE 10 int main(int argc, char *argv[]){ char input[MAXSIZE], c, *input_ptr; input_tag: printf("...
Bittu970's user avatar
  • 107
2 votes
1 answer
108 views

Migrating from BASIC to Rust, what do I do with On Gosub?

Most BASIC to Rust code is straightforward. However, what do I do with On Gosub? My brief is to use identical code constructs wherever possible. Here is the BASIC code (reduced to the minimum). choice ...
Skaffi's user avatar
  • 23
0 votes
1 answer
63 views

How to use 'goto' in gopher-lua v1.1.0?

How to use 'goto' in gopher-lua v1.1.0? Is seems that gopher-lua has already support 'goto' over v1.1.0 link I have already update gopher-lua's version in v1.1.0. But when I use goto goto and ::label::...
Archer Sean's user avatar
3 votes
1 answer
103 views

Why does `void *p = &&aa;` compile even when the code for label `aa` is optimized away due to a `goto` statement?

In C language, I want to obtain the address of a label, and I found the following method: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html However, due to the presence of a goto statement in ...
吃花椒的喵酱's user avatar
0 votes
0 answers
32 views

While converting a Sybase ASE script to a PL/pgSQL procedure, how we can translate "goto"?

I am trying to rewrite a Sybase ASE script to a PostgreSQL script. There is goto in Sybase ASE to shift the execution to a particular block of code and after executing that block, the execution should ...
Pruthviraj Desai's user avatar
1 vote
1 answer
39 views

Converting FOCAL to language without GOTO: can an "if" statement with multiple GOTO be parsed algorithmically?

I know that I can translate simple GOTO inside a for or while loop by using if/else or break statements. My question is about trying to write a 'translator' function which automatically converts ...
Carl Witthoft's user avatar
0 votes
0 answers
33 views

Does the FOCAL language allow breaking out of a FOR loop?

I don't have an interpreter handy to try this out. I'm wondering whether FOCAL allows the use of IF inside a FOR line to break out of the loop. Would something like the following code run, or is it ...
Carl Witthoft's user avatar
-1 votes
1 answer
276 views

What is the Microsoft goto extension? [closed]

I am writing a C++ generator, that needs to use the goto statement. I am compiling my code with clang++ and get the warning [-Wmicrosoft-goto] on some of my gotos. All of my gotos only jump around ...
Peter's user avatar
  • 115
6 votes
1 answer
201 views

Can Knuth's "Algorithm B" for Queens puzzle be written without goto statements or recursion?

Though I'm aware of the basic recursive N queens solution, I'm trying to learn more about backtracking by studying and implementing Knuth's "Algorithm B (Basic backtrack)" for the case of ...
MaroonSphinx's user avatar
-1 votes
1 answer
46 views

What is the best way to have different entry points for a list of iterative commands?

I have a list of iterative Python commands: def command_list(start_at): step1 step2 step3 # ... stepN Now I want to start_at different steps in this list of commands and then ...
Sur3's user avatar
  • 29
2 votes
1 answer
150 views

C# Best way to break out of multiple nested functions with high performance

*Sorry, I will continuously edit my article to make my description clearer to express my question. This may also cause some inconvenience. I have an automation program used to control other ...
SAng's user avatar
  • 51
1 vote
1 answer
309 views

GCC "labels as values" – intended usage

I recently heard about the Labels as Values extension to C/C++ in GCC and other compilers. I was thinking about how I'd use that to write a threaded interpreter (where a virtual machine program is ...
bobtato's user avatar
  • 1,229
0 votes
2 answers
74 views

How to reuse switch block labels without goto?

How to implement the following code without goto and unnecessary code complexity? namespace Test { static class Program { bool keyA = false; bool keyB = false; // ... ...
ng256's user avatar
  • 87

15 30 50 per page
1
2 3 4 5
72