Search Results: Argv
Redirect to:
- To a section: This is a redirect from a topic that does not have its own page to a section of a page on the subject. For redirects to embedded anchors on a page, use {{R to anchor}} instead.
Entry point
Kamis, 2026-07-16 05:39:41determined using the ARGV constant array: $ irb /dev/tty foo bar tty(main):001:0> ARGV ARGV => ["foo", "bar"] tty(main):002:0> ARGV.size ARGV.size => 2 The first...
Click to read more »Command-line argument parsing
Sabtu, 2026-08-08 21:56:49{ println(arg) } } Perl uses @ARGV. foreach $arg (@ARGV) { print $arg; } or foreach $argnum (0 .. $#ARGV) { print $ARGV[$argnum]; } There is also Getopt::Long...
Click to read more »Expect
Jumat, 2026-01-16 13:55:06[lindex $argv 0] set passw [lindex $argv 1] set host [lindex $argv 2] set location [lindex $argv 3] set file1 [lindex $argv 4] set file2 [lindex $argv 5] #puts...
Click to read more »Operator-precedence parser
Jumat, 2026-05-01 21:35:49argc, char *argv[]) { int i; printf("(((("); for (i=1; i!=argc; i++) { // strlen(argv[i]) == 2 if (argv[i] && !argv[i][1]) { switch (*argv[i]) { case '(':...
Click to read more »Bash (Unix shell)
Minggu, 2026-08-02 11:31:20Manual: 5.2: Bash Variables". Free Software Foundation, Inc. GNU Project. BASH_ARGV. Retrieved 8 August 2025. "Bash Reference Manual: 5.2: Bash Variables". Free...
Click to read more »Quine (computing)
Jumat, 2026-08-07 22:58:22that outputs the original Java code. import std; int main(int argc, char* argv[]) { char q = 34; std::array<std::string, 36> l = { " ", "=============<<<<<<<<...
Click to read more »Getopt
Kamis, 2026-07-30 06:39:20#include <unistd.h> int getopt(int argc, char* const argv[], const char* optstring); Here the argc and argv are defined exactly like they are in the C main...
Click to read more »C++ syntax
Kamis, 2026-08-06 06:30:18World!" program program is as follows: import std; int main(int argc, char* argv[]) { std::println("Hello, world!"); } Prior to C++23, the "Hello, world!"...
Click to read more »AWK
Sabtu, 2026-08-08 20:45:41but is a bit lengthy: BEGIN { pattern = ARGV[1] for (i = 1; i < ARGC; i++) # remove first argument ARGV[i] = ARGV[i + 1] ARGC-- if (ARGC == 1) { # the pattern...
Click to read more »Exec (system call)
Rabu, 2026-07-08 17:29:01char const* argv[]); int execve(char const* path, char const* argv[], char const* envp[]); int execvp(char const* file, char const* argv[]); int execvpe(const...
Click to read more »Dependency injection
Kamis, 2026-08-06 06:31:37std::println("Executing database service..."); } }; int main(int argc, char* argv[]) { DatabaseConnection db; DatabaseService sv(db); sv.execute(); } This...
Click to read more »Spawn (computing)
Rabu, 2026-06-03 02:18:24char* path, char* argv[]); int spawnve(int mode, char* path, char* argv[], char* envp[]); int spawnvp(int mode, char* path, char* argv[]); int spawnvpe(int...
Click to read more »Shrinking generator
Senin, 2025-02-10 20:28:57SPRNG( int(sys.argv[3], 16), int(sys.argv[4], 16), int(sys.argv[5], 16), int(sys.argv[6], 16), ) with open(sys.argv[1], "rb") as f, open(sys.argv[2], "wb")...
Click to read more »SimpleITK
Kamis, 2026-06-18 07:11:17len(sys.argv) < 4: print("Usage: SimpleGaussian <input> <sigma> <output>") sys.exit(1) reader = sitk.ImageFileReader() reader.SetFileName(sys.argv[1]) image...
Click to read more »Fish (Unix shell)
Jumat, 2026-05-08 01:09:30arguments "$@" $argv argument vector: indexing "$1" $argv[1] argument vector: length $# (count $argv) argument vector: shift shift set --erase argv[1] array...
Click to read more »Lis (linear algebra library)
Kamis, 2026-03-12 17:22:22main(LIS_INT argc, char* argv[]) { LIS_MATRIX A; LIS_VECTOR b, x; LIS_SOLVER solver; LIS_INT iter; double time; lis_initialize(&argc, &argv); lis_matrix_create(LIS_COMM_WORLD...
Click to read more »Stat (system call)
Selasa, 2026-07-07 07:11:47<sys/types.h> int main(int argc, char* argv[]) { struct stat sb; for (int i = 1; i < argc; i++) { if (stat(argv[i], &sb) == -1) { perror("stat failed");...
Click to read more »C syntax
Minggu, 2026-07-26 07:05:02char* argv[]); int main(int argc, char** argv); int main(void); int main(int argc, char* argv[], char* envp[]); int main(int argc, char** argv, char**...
Click to read more »$0
Selasa, 2026-07-21 22:11:17$0 may refer to: The program name stored in argv[0], in Shell scripts The current Document Object Model (DOM) node in Chrome web browser The polymorphic...
Click to read more »Binfmt misc
Kamis, 2026-07-30 13:31:10name to argv; the interpreter has to be aware of this so it can correctly pass that additional parameter to the interpreted program as its argv[0]. O to...
Click to read more »Decorator pattern
Jumat, 2026-02-27 13:59:32std::print(", with {} spoons of sugar", spoons); } }; int main(int argc, char* argv[]) { unique_ptr<Beverage> soda = std::make_unique<Soda>(); soda =...
Click to read more »Name mangling
Selasa, 2026-08-04 10:11:46#ifdef __cplusplus } #endif Thus, code such as: if (strcmp(argv[1], "-x") == 0) { strcpy(a, argv[2]); } else { memset(a, 0, sizeof(a)); } uses the correct...
Click to read more »Pointer (computer programming)
Sabtu, 2026-06-13 21:38:31argv argument to the main function in C (and C++), which is given in the prototype as char **argv (or char *argv[])—this is because the variable argv...
Click to read more »CPU time
Jumat, 2026-02-20 00:54:100) return 0; return 1; } int main(int argc, char *argv[]) { unsigned long int argument = strtoul(argv[1], NULL, 10), n = argument; while (!isPrimeNumber(++n));...
Click to read more »Code sanitizer
Minggu, 2026-08-02 02:36:48-O -g -fsanitize=address heap-use-after-free.cc int main(int argc, char **argv) { int *array = new int[100]; delete [] array; return array[argc]; // BOOM...
Click to read more »Perl
Selasa, 2026-08-04 12:00:37strict; use warnings; my ( $remaining, $total ); $remaining=$total=shift(@ARGV); STDOUT->autoflush(1); while ( $remaining ) { printf ( "Remaining %s/%s...
Click to read more »Glob (programming)
Sabtu, 2026-06-20 01:18:29Windows and DOS programs receive a long command-line string instead of argv-style parameters, and it is their responsibility to perform any splitting...
Click to read more »Observer pattern
Kamis, 2026-02-19 02:39:16override { std::println("Got a notification"); } }; int main(int argc, char* argv[]) { Subject cs; ConcreteObserver co1(cs); ConcreteObserver co2(cs); cs.notify();...
Click to read more »Command pattern
Kamis, 2025-10-30 12:06:30{ std::println("MyClass::action called"); } }; int main(int argc, char* argv[]) { shared_ptr<MyClass> receiver = std::make_shared<MyClass>(); // ... unique_ptr<Command>...
Click to read more »Stack buffer overflow
Selasa, 2026-05-12 19:13:43strcpy(c, bar); // no bounds checking } int main(int argc, char* argv[]) { foo(argv[1]); return 0; } This code takes an argument from the command line...
Click to read more »Command-line interface
Senin, 2026-07-20 07:02:40specific API (functionality) through the sys module, and in particular sys.argv for command-line arguments. In Unix-like operating systems, a single hyphen...
Click to read more »Abstract factory pattern
Selasa, 2026-07-07 12:13:40setSide(MapSite::Direction::WEST, door); return maze; } }; int main(int argc, char* argv[]) { MazeGame game; unique_ptr<Maze> maze = game.createMaze(MazeFactory());...
Click to read more »Dynamic-link library
Rabu, 2026-07-01 19:57:45__declspec(dllimport) double AddNumbers(double a, double b); int main(int argc, char *argv[]) { double result = AddNumbers(1, 2); printf("The result was: %f\n", result);...
Click to read more »Factory method pattern
Selasa, 2026-07-07 12:18:18std::unreachable(); } virtual ~Creator() = default; }; int main(int argc, char* argv[]) { unique_ptr<Creator> creator = std::make_unique<Creator>(); unique_ptr<Product>...
Click to read more »Model–view–viewmodel
Minggu, 2026-07-19 04:07:24mvvm; using namespace wikipedia::examples::mvvm; int main(int argc, char* argv[]) { Model m; ViewModel vm(m); View v(vm); v.run(); return 0; } This is an...
Click to read more »Sizeof
Minggu, 2026-01-11 22:30:05<stdio.h> int main(int argc, char* argv[]) { // Array of 10 chars char buffer[10]; /* Copy at most 9 characters from argv[1] into buffer, * null-terminate...
Click to read more »Lazy initialization
Jumat, 2025-11-07 07:55:17for (int i = 1; i < argc; i++) { if (f = getFruit(argv[i])) { printf("Fruit %s: number %d\n", argv[i], f->number); } } return 0; } Using one source file...
Click to read more »Python syntax and semantics
Minggu, 2026-07-26 16:59:11structure: import sys def main(argv: list[str]) -> int: argc: int = len(argv) # get length of argv n: int = int(argv[1]) print(n + 1) return 0 if __name__...
Click to read more »Indentation style
Kamis, 2026-06-25 07:13:11a keyword such as else or while. Example code: int main(int argc, char *argv[]) { while (x == y) { do_something(); do_something_else(); if (some_error)...
Click to read more »Modules (C++)
Jumat, 2026-08-07 04:11:20like so: import std.io; int main(int argc, char* argv[]) { if (argc > 1) { printf("Hello, %s!\n", argv[1]); } else { printf("Hello, world!\n"); } return...
Click to read more »Async/await
Minggu, 2026-08-02 00:35:56g_stack0); s_task_join(__await__, g_stack1); } int main(int argc, char* argv[]) { s_task_init_system(); // create the main task s_task_create(g_stack_main...
Click to read more »Iterator pattern
Rabu, 2025-11-05 03:06:22DoubleVector&) = delete; // disable copy assignment }; int main(int argc, char* argv[]) { DoubleVector v = {1.1 * 1.1, 2.2 * 2.2}; for (const double& x : v) {...
Click to read more »ATS (programming language)
Senin, 2026-06-22 17:06:39(argc, argv) = { val () = if (argc != 2) then prerrln! ("Usage: ", argv[0], " <integer>") val () = assert (argc >= 2) val n0 = g0string2int (argv[1]) val...
Click to read more »RE2 (software)
Rabu, 2026-05-06 21:39:38import std; using std::string; using re2::RE2; int main(int argc, char* argv[]) { string text = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!" string pattern = "(a+)+$";...
Click to read more »Fox toolkit
Senin, 2025-11-03 04:00:20#include "fx.h" int main(int argc, char *argv[]) { FXApp application("Hello", "FoxTest"); application.init(argc, argv); FXMainWindow *main=new FXMainWindow(&application...
Click to read more »ReDoS
Kamis, 2026-07-30 18:46:26"; constexpr string_view PATTERN = "^(a+)+$"; int main(int argc, char* argv[]) { bool isMatch = RE2::FullMatch(TEXT, PATTERN); std::println("Match result:...
Click to read more »Pseudorandom binary sequence
Selasa, 2026-02-10 16:53:36<stdio.h> #include <stdint.h> #include <stdlib.h> int main(int argc, char* argv[]) { uint8_t start = 0x02; uint8_t a = start; int i; for (i = 1;; i++) {...
Click to read more »Wt (web toolkit)
Minggu, 2026-06-21 03:38:49greeting_->setText("Hello there, " + nameEdit_->text()); } int main(int argc, char **argv) { /* * Your main method may set up some shared resources, but should then...
Click to read more »LL parser
Jumat, 2026-05-01 03:52:46terminal symbol default: return TS_INVALID; } } int main(int argc, char **argv) { using namespace std; if (argc < 2) { cout << "usage:\n\tll '(a+a)'" <<...
Click to read more »Multiple dispatch
Rabu, 2026-04-22 18:52:42CollisionHandler(&Spaceship::spaceshipCollision)); } int main(int argc, char* argv[]) { Asteroid::initCases(); Spaceship::initCases(); Asteroid a1; Asteroid...
Click to read more »Higher-order function
Minggu, 2026-06-07 03:28:25G g) { return Composition<F, G> {f, g}; } int main(int argc, const char* argv[]) { auto f = compose(DivBy<float>{ 2.0f }, Add<int>{ 5 }); apply(f, 3);...
Click to read more »Uuencoding
Sabtu, 2026-01-24 15:38:33more of code: $ perl -ple 'BEGIN{use File::Basename;$/=undef;$sn=basename($ARGV[0]);} $_= "begin 600 $sn\n".(pack "u", $_)."`\nend" if $_' /some/file/to_encode...
Click to read more »OCaml
Kamis, 2026-08-06 09:23:42renders a rotating triangle in 2D using OpenGL: let () = ignore (Glut.init Sys.argv); Glut.initDisplayMode ~double_buffer:true (); ignore (Glut.createWindow...
Click to read more »Reflective programming
Kamis, 2026-08-06 06:26:33printHello() const { std::println("Hello, world!"); } }; int main(int argc, char* argv[]) { Foo foo; // Without reflection foo.printHello(); // With reflection...
Click to read more »Cyclone (programming language)
Senin, 2026-04-06 20:58:58equivalent: int main(int argc, char?? argv); // equivalent to the more verbose declaration int main(int argc, char*@fat*@fat argv); Similar to templates in C++...
Click to read more »Branch table
Selasa, 2026-05-05 05:47:55func3}; int main (int argc, char **argv) { int value; /* Convert first argument to 0-3 integer (modulus) */ value = atoi(argv[1]) % 4; /* Call appropriate function...
Click to read more »LLVM
Sabtu, 2026-07-18 14:28:41world\0A\00" declare i32 @printf(ptr, ...) define i32 @main(i32 %argc, ptr %argv) nounwind { entry: %tmp1 = getelementptr [14 x i8], ptr @.str, i32 0, i32...
Click to read more »Dc (computer program)
Selasa, 2026-07-28 06:22:06perl -- -export-a-crypto-system-sig Diffie-Hellman-2-lines ($g, $e, $m) = @ARGV, $m || die "$0 gen exp mod\n"; print `echo "16dio1[d2%Sa2/d0<X+d*La1=z\U...
Click to read more »INI file
Senin, 2026-06-08 19:47:06file be dbsettings.ini): #include <windows.h> int main(int argc, TCHAR *argv[]) { TCHAR dbserver[1000]; int dbport; GetPrivateProfileString(TEXT("database")...
Click to read more »Variadic function
Selasa, 2026-07-14 12:20:15next argument } va_end(ap); return sum / count; } int main(int argc, char* argv[]) { printf("%f\n", average(3, 1, 2, 3)); return 0; } This will compute the...
Click to read more »Template method pattern
Rabu, 2026-03-25 07:58:00std::println("MyView::doDisplay called"); } }; int main(int argc, char* argv[]) { unique_ptr<View> myview = std::make_unique<MyView>(); myview->display();...
Click to read more »Re2c
Jumat, 2026-05-08 00:53:46printf("hex\n"); return 0; } */ } int main(int argc, char* argv[]) { for (int i = 1; i < argc; ++i) { lex(argv[i]); } return 0; } Given that, re2c -is -o example...
Click to read more »Run-time type information
Senin, 2026-08-03 05:07:59std::println("Object is not of type Bar"); } } int main(int argc, char* argv[]) { // Array of pointers to base class Foo. array<unique_ptr<Foo>, 3> foos...
Click to read more »Objective-C
Sabtu, 2026-05-09 16:57:01hello.m #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { /* my first program in Objective-C */ NSLog(@"Hello, World! \n"); return...
Click to read more »Interpreter pattern
Jumat, 2026-04-10 16:17:58AndExpression& operator=(const AndExpression&) = delete; }; int main(int argc, char* argv[]) { UniquePtr<BooleanExpression> expression; Context context;...
Click to read more »Boehm garbage collector
Senin, 2026-03-23 17:47:00#include <stdio.h> #include <stdlib.h> #include <gc.h> int main(int argc, char* argv[]) { const int SIZE = 10000000; GC_INIT(); for (int i = 0; i < SIZE; ++i)...
Click to read more »Concurrent ML
Rabu, 2024-05-15 18:55:06(fn () => TextIO.print (recv c)); send (c, "Hello, world!\n"); exit () end fun main (_, argv) = RunCML.doit (fn () => ignore (spawn hello), NONE) end...
Click to read more »Message Passing Interface
Kamis, 2026-05-28 18:39:53char **argv) { char buf[256]; int my_rank, num_procs; /* Initialize the infrastructure necessary for communication */ MPI_Init(&argc, &argv); /* Identify...
Click to read more »Vectored I/O
Senin, 2026-07-27 08:34:16<string.h> #include <unistd.h> #include <sys/uio.h> int main(int argc, char *argv[]) { const char buf1[] = "Hello, "; const char buf2[] = "Wikipedia "; const...
Click to read more »Flyweight pattern
Jumat, 2026-06-26 07:09:32occupies room {}", tenant.name(), room); } } }; int main(int argc, char* argv[]) { Apartment apartment; apartment.addOccupant("David", 1); apartment.addOccupant("Sarah"...
Click to read more »Weak symbol
Minggu, 2025-06-29 09:04:19#include "power_slow.h" int main(int argc, char **argv) { fprintf(stderr, "power3() = %d\n", power3(atoi(argv[1]))); return 0; } power_slow.h: #ifndef POWER2_SLOW_H...
Click to read more »Generic programming
Jumat, 2026-07-31 20:28:15T& b) noexcept { T temp = b; b = a; a = temp; } int main(int argc, char* argv[]) { string world = "World!"; string hello = "Hello,"; swap(world, hello);...
Click to read more »GNU Compiler for Java
Minggu, 2026-08-02 02:44:00::JvInitClass(&Math::class$); JArray<String*>* args = ::JvConvertArgv(argc, argv); // String[] args jdouble one = Math::sin(Math::PI / 2); URI* location...
Click to read more »UPX
Sabtu, 2026-01-24 11:23:05has several disadvantages: Special permissions are ignored, such as suid. argv[0] will not be meaningful. Multiple running instances of the executable are...
Click to read more »Chain-of-responsibility pattern
Minggu, 2026-05-31 07:49:47called"); // show a list of help topics } }; int main(int argc, char* argv[]) { shared_ptr<Application> application = std::make_shared<Application>...
Click to read more »Dispatch table
Rabu, 2026-07-22 08:40:51# Fetch the code ref from the table, and invoke it my $sub = $dispatch{$ARGV[0]}; print $sub ? $sub->() : "unknown argument\n"; Running this Perl program...
Click to read more »Qrpff
Jumat, 2026-04-03 06:38:04$_)[20]&48){$h =5;$_=unxb24,join"",@b=map{xB8,unxb8,chr($_^$a[--$h+84])}@ARGV;s/...$/1$&/;$ d=unxV,xb25,$_;$e=256|(ord$b[4])<<9|ord$b[3];$d=$d>>8^($f=$t&($d>>12^$d>>4^...
Click to read more »Batch file
Jumat, 2026-07-24 20:56:43built into the Microsoft Visual C++ runtime library] or in the CommandLineToArgvW function. It uses the convention that 2n backslashes followed by a quotation...
Click to read more »Destructor (computer programming)
Selasa, 2026-07-21 18:11:08std::formatter<Foo> { // Definition of Formatter for Foo here }; int main(int argc, char* argv[]) { Foo foo("Hello from the stack!"); std::println("{}", foo); Foo* foo...
Click to read more »Associative containers (C++)
Sabtu, 2026-04-04 20:23:54using std::cin; using std::map; using std::string; int main(int argc, char* argv[]) { map<string, int> wordCounts; string s; while (cin >> s && s != "end")...
Click to read more »Borland Graphics Interface
Senin, 2026-06-22 06:44:10<graphics.h> #include <conio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int i, gd = DETECT, gm; initgraph(&gd, &gm, ""); setbkcolor(BLACK);...
Click to read more »Unordered associative containers (C++)
Sabtu, 2026-03-14 22:55:14{"October", 31}, {"November", 30}, {"December", 31} }; int main(int argc, char* argv[]) { std::println("September -> {}", MONTHS["September"]); std::println("April...
Click to read more »FLTK
Senin, 2026-07-13 13:27:58main(int argc, char *argv[]) { Fl_Window* w = new Fl_Window(330, 190); new Fl_Button(110, 130, 100, 35, "Okay"); w->end(); w->show(argc, argv); return Fl::run();...
Click to read more »Bus error
Kamis, 2025-08-14 16:27:35with AT&T assembly syntax. #include <stdlib.h> int main(int argc, char **argv) { int *iptr; char *cptr; #if defined(__GNUC__) # if defined(__i386__) /*...
Click to read more »Raylib
Senin, 2026-05-25 05:25:19raylib::Window; using namespace raylib::Colors; int main(int argc, char* argv[]) { constexpr int SCREEN_WIDTH = 800; constexpr int SCREEN_HEIGHT = 450;...
Click to read more »Auto ptr
Jumat, 2026-05-22 03:31:24<iostream> #include <memory> using std::auto_ptr; int main(int argc, char* argv[]) { int* a = new int[10]; auto_ptr<int[]> x(a); auto_ptr<int[]> y; y = x;...
Click to read more »OpenCL
Minggu, 2026-07-19 05:22:10"CL/opencl.h" #define NUM_ENTRIES 1024 int main() // (int argc, const char* argv[]) { // CONSTANTS // The source code of the kernel is represented as a string...
Click to read more »Virtual inheritance
Senin, 2025-11-17 13:44:57E: public D { // public: // E(): // D() {} // }; int main(int argc, char* argv[]) { D d; d.test(); // prints: "hello from A: instance of D" E e; e.test();...
Click to read more »Gtkmm
Selasa, 2026-06-02 06:14:53<gtkmm/application.h> #include "HelloWorldWindow.h" int main(int argc, char *argv[]) { // Create an application object. auto app = Gtk::Application::create("org...
Click to read more »Crt0
Senin, 2025-10-20 13:51:12(implicitly zero-extended to 64-bit) lea 8(%rsp), %rsi # take the address of argv from the stack lea 16(%rsp,%rdi,8), %rdx # take the address of envp from...
Click to read more »Cairo (graphics)
Jumat, 2026-07-17 14:44:29Cairo: #include <cairo-svg.h> #include <stdio.h> int main(int argc, char **argv) { cairo_surface_t *surface = cairo_svg_surface_create("Cairo_example.svg"...
Click to read more »GNU coding standards
Minggu, 2026-04-26 23:32:52characteristic example: int main (int argc, char *argv[]) { struct gizmo foo; fetch_gizmo (&foo, argv[1]); check: if (foo.type == MOOMIN) puts ("It's a...
Click to read more »Result type
Selasa, 2026-04-07 03:01:42rdbuf(); config.close(); return buffer.str(); } int main(int argc, char* argv[]) { path p{"configs/my_config.txt"}; if (const expected<String, FileError>...
Click to read more »Coroutine
Selasa, 2026-07-28 10:35:13std::println("Return {}", ret); co_return ret; } int main(int argc, char* argv[]) { optional<tuple<int>> result = std::this_thread::sync_wait(test());...
Click to read more »Carbon (programming language)
Minggu, 2026-07-05 08:30:41radius; } std::println("Total area: {}", area); } int main(int argc, char* argv[]) { vector<Circle> circles{{.radius = 1.0f}, {.radius = 2.0f}}; // Implicitly...
Click to read more »Producer–consumer problem
Minggu, 2026-06-21 00:49:11%d\n", p); sleep(200 + nrand(600)); } } void threadmain(int argc, char **argv) { int (*mk)(void (*fn)(void*), void *arg, uint stack); mk = threadcreate;...
Click to read more »Inetd
Senin, 2026-05-11 05:43:19#include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { const char *fn = argv[1]; FILE *fp = fopen(fn, "a+"); if (fp == NULL) exit(EXIT_FAILURE);...
Click to read more »Option type
Selasa, 2026-07-07 20:46:44quotient of x: {} and y: {} is undefined!", x, y); } } int main(int argc, char* argv[]) { readDivisionResults(1, 5); readDivisionResults(8, 0); } In C++23, support...
Click to read more »Fault injection
Senin, 2026-05-04 02:45:59value) { return value + 20; } int main(int argc, char * argv[]) { int a = pFunc(aFunction(atoi(argv[1]))); if (a > 20) { /* do something */ } else { /* do...
Click to read more »One Definition Rule
Selasa, 2026-02-24 00:28:27wikipedia::examples::Dummy1; using wikipedia::examples::Dummy2; int main(int argc, char* argv[]) { Base* o1 = odr1Create(); Base* o2 = odr2Create(); o1->myFunc(); o2->myFunc();...
Click to read more »PySide
Selasa, 2025-10-14 06:29:53QtCore, QtWidgets # Create a Qt application app = QtWidgets.QApplication(sys.argv) # Create the main window main_window = QtWidgets.QWidget() main_window.resize(320...
Click to read more »OpenMP
Senin, 2026-01-19 20:34:22some constant for array length #define N 100000 int main(int argc, char* argv[]) { int a[N]; #pragma omp parallel for for (int i = 0; i < N; i++) { a[i]...
Click to read more »Stream processing
Senin, 2026-07-27 10:59:48push("Hello World\n"); return raft::stop; } }; int main(int argc, char* argv[]) { // instantiate print kernel RaftPrint<String> p; // instantiate hello...
Click to read more »Access modifiers
Rabu, 2026-01-07 01:51:44int get_x() const noexcept { // return x; // } }; int main(int argc, char* argv[]) { Derived d; // d.x = 2; // ERROR, private // d.n = 2; // ERROR, protected...
Click to read more »Jackson structured programming
Rabu, 2026-07-01 06:34:25into C. #include <stdio.h> #include <stdlib.h> int main(int argc, char* argv[]) { char first_byte; int count = 0; char c = getchar(); // get first byte...
Click to read more »Charm (programming language)
Sabtu, 2025-09-13 06:06:14export proc ~start () export proc ~start (int argc, ref array ref array char argv) This is analogous to the main function in the C and Java languages. Here...
Click to read more »Property (programming)
Rabu, 2026-07-08 14:37:58Property<bool> alpha; Property<unsigned int> bravo; }; int main(int argc, char* argv[]) { Foo foo; foo.alpha = 5; foo.bravo = 5.132f; Bar bar; bar.alpha = true;...
Click to read more »TECO (text editor)
Rabu, 2026-06-03 15:06:29file named hello.c with the following contents: int main(int argc, char **argv) { printf("Hello world!\n"); return 0; } ... one could use the following...
Click to read more »Bridge pattern
Selasa, 2026-05-05 18:30:15return radius *= (1.0f + percent / 100.0f); } }; int main(int argc, char* argv[]) { const DrawingAPI01 api1; const DrawingAPI02 api2; vector<CircleShape>...
Click to read more »Setcontext
Sabtu, 2025-11-08 03:44:52#include <ucontext.h> #include <unistd.h> int main(int argc, const char *argv[]){ ucontext_t context; getcontext(&context); puts("Hello world"); sleep(1);...
Click to read more »OpenHMPP
Kamis, 2025-09-18 11:18:26temp += inv[j] * inm[i][ j]; } outv[i] = temp; } int main(int argc, char **argv) { int n; ........ /* codelet use */ #pragma hmpp simple1 callsite, args[outv]...
Click to read more »C shell
Senin, 2026-06-29 05:56:44script by explicitly calling its file.' exit -1 endif alias function 'set argv = ( \!* ) ; source "$main"' set main = "$0" set ret = "`function myfunc`"...
Click to read more »Variable-length array
Sabtu, 2025-12-13 13:35:17createIntArray(size_t n) { return new int[n]; } int main(int argc, char* argv[]) { int* a = createIntArray(5); // do something with the array delete[]...
Click to read more »Method overriding
Jumat, 2025-11-14 04:26:32Box, and call their respective display methods: int main(int argc, char* argv[]) { Rectangle rectangle(5.0, 3.0); // Outputs: Rectangle[length=5.0, width=3...
Click to read more »RaftLib
Kamis, 2026-07-30 03:06:31push("Hello World\n"); return raft::stop; } }; int main(int argc, char* argv[]) { // instantiate print kernel RaftPrint<String> p; // instantiate hello...
Click to read more »DIGITAL Command Language
Selasa, 2026-05-19 07:40:52ported from Unix and other non-native systems; for C programs using argc and argv command syntax. Versions of OpenVMS DCL starting with V6.2 support the DCL$PATH...
Click to read more »C++/WinRT
Kamis, 2026-08-06 23:31:24dialog(L"Hello, world!"); co_await dialog.ShowAsync(); } int main(int argc, char* argv[]) { // initialize COM/WinRT apartment thread winrt::init_apartment(); //...
Click to read more »Enumerated type
Sabtu, 2026-07-25 04:37:48scoped enum enum class Color { RED, GREEN, BLUE, }; int main(int argc, char* argv[]) { Color c = Color::RED; // Unscoped C-style enum CardSuit card1 = Clubs;...
Click to read more »Xargs
Sabtu, 2026-07-11 10:21:38fill in for $0, the "executable name" part of the positional parameters (argv). If it weren't present, the name of the first matched file would be instead...
Click to read more »CppUnit
Kamis, 2026-04-23 14:34:18using wikipedia::examples::tests::IntegerTest; int main(int argc, char* argv[]) { TestRunner testRunner; runner.addTest(IntegerTest::suite()); runner...
Click to read more »ESpeak
Kamis, 2026-07-23 03:05:13rhdunn/Espeak@63daaec". GitHub. "Espeakedit: Fix argument processing for unicode argv types · rhdunn/Espeak@61522a1". GitHub. "Switch to eSpeak NG in NVDA distribution...
Click to read more »Select (Unix)
Rabu, 2025-12-03 09:01:36exit(EXIT_FAILURE); } typedef struct addrinfo AddressInfo; int main(int argc, char* argv[]) { int sockfd; AddressInfo* res0; char buffer[BUFSIZ]; fd_set master; fd_set...
Click to read more »List comprehension
Senin, 2026-05-11 10:35:51std::ranges::for_each(d, transformation); return d; } int main(int argc, char* argv[]) { vector<int> range(10); // range is a list of 10 elements, all zero...
Click to read more »Hooking
Rabu, 2026-05-06 04:23:42lpCaption, uType); //Call the real function } int main(int argc, CHAR *argv[]) { DetourIATptr("MessageBoxA",(void*)NewMessageBoxA,0); //Hook the function...
Click to read more »Reflection (C++)
Sabtu, 2026-08-08 11:56:26int count = 1; }; int main(int argc, char* argv[]) { Args args = wikipedia::clap::parse<Args>(argc, argv); for (int i = 0; i < args.count; ++i) { std::println("Hello...
Click to read more »X session manager
Senin, 2025-08-11 11:20:07system-dependent: in a POSIX system, this property actually contains the argv array) the client stores its state locally; for example, it may store the...
Click to read more »Downcasting
Minggu, 2025-09-07 05:41:51// Child class: class Apple : public Fruit {}; int main(int argc, char* argv[]) { // The following is an implicit upcast: Fruit* parent = new Apple();...
Click to read more »Seekg
Senin, 2025-11-24 02:49:08reached, if the file has data // then this will be false. ifstream myFile(argv[1], ios::in); std::println(myFile.eof()); // Continuously loops over each...
Click to read more »Comparison of programming languages (basic instructions)
Jumat, 2026-04-17 13:09:36Python sys.argv[n] len(sys.argv) first argument S-Lang __argv[n] __argc first argument Fortran DO i = 1,argc CALL GET_COMMAND_ARGUMENT (i,argv(i)) ENDDO...
Click to read more »Noweb
Selasa, 2026-07-14 15:38:20<<hello.c>>= /* <<license>> */ #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello World!\n"); return 0; } @ \noindent \ldots then I did...
Click to read more »Loop fission and fusion
Senin, 2025-10-20 07:34:15++i) { b[i] = std::sin(a[i]); } return b; } }; int main(int argc, char* argv[]) { // Here, we perform the same computation as the MATLAB example FloatArray...
Click to read more »Can4linux
Minggu, 2024-08-04 04:36:19<fcntl.h> #include <unistd.h> #include <can4linux.h> int main(int argc,char **argv) { int fd; canmsg_t frame; /* open(), bit rate comes from parameters at proc/sys/dev/Can...
Click to read more »Examples of anonymous functions
Kamis, 2026-06-25 21:54:27++i) { printf("%d %d\n", arr[i].a, arr[i].b); } } int main(int argc, char* argv[]) { IntegerPair pairArray[] = { {0, 1}, {2, 3}, {4, 5} }; printElements(a...
Click to read more »Prototype pattern
Kamis, 2025-12-18 13:54:39setSide(Direction::WEST, door); return maze; } }; int main(int argc, char* argv[]) { MazeGame game; MazePrototypeFactory simpleMazeFactory( std::make_unique<Maze>()...
Click to read more »Partial template specialization
Minggu, 2026-05-03 04:22:36following program. import std; using std::string; int main(int argc, char* argv[]) { char c = 'c'; // let the compiler resolve the call string r0 = Foo(c);...
Click to read more »Seed (programming)
Jumat, 2025-10-24 00:50:22named "Example". #!/usr/bin/env seed Gtk = imports.gi.Gtk; Gtk.init(Seed.argv); var window = new Gtk.Window({title: "Example"}); window.signal.hide.connect(Gtk...
Click to read more »Variadic template
Selasa, 2026-07-14 13:40:43value from B: {}", instance.secretValue); } }; int main(int argc, char* argv[]) { WithFriends<A, B> secretHolder(135); A a; B b; a.readSecret(secretHolder);...
Click to read more »AltiVec
Selasa, 2026-04-07 02:16:58uint8x16_p; typedef __vector unsigned int uint32x4_p; ... int main(int argc, char* argv) { /* Natural alignment of vals is 4; and not 16 as required */ unsigned...
Click to read more »Template metaprogramming
Kamis, 2026-08-06 09:30:02tuple<typename Res<Number<Amount>>::Result>>::Type; int main(int argc, char* argv[]) { // printing result using boost.type_index, so it's clear std::println("{}"...
Click to read more »Friend class
Selasa, 2025-11-11 21:33:31value from B: {}", instance.secretValue); } }; int main(int argc, char* argv[]) { ClassWithFriends<A, B> secretHolder(135); A a; B b; a.readSecret(secretHolder);...
Click to read more »Adept (C++ library)
Sabtu, 2026-01-24 12:00:33adept::Real; using adept::Stack; using adept::Vector; int main(int argc, char* argv[]) { Stack s; // Object to store differential statements Vector x(3); //...
Click to read more »Sequence container (C++)
Minggu, 2026-04-12 04:08:53std::mt19937; using std::random_device; using std::vector; int main(int argc, char* argv[]) { array<int, 4> arr{1, 2, 3, 4}; // initialize a vector from an array...
Click to read more »Swiss labour law
Minggu, 2026-01-11 21:38:15in der Systematischen Sammlung des Bundes Verordnung zum Arbeitsgesetz (ArGV) in der Systematischen Sammlung des Bundes Bundespersonalgesetz (BPG) in...
Click to read more »Simple API for Grid Applications
Senin, 2026-07-27 08:16:01JavaSAGA remains uncertain. import java.util.io.* int main (int argc, char** argv) { namespace sa = saga::attributes; namespace sja = saga::job::attributes;...
Click to read more »Comparison of programming languages (associative array)
Kamis, 2026-07-09 01:32:32std; using std::string; using std::unordered_map; int main(int argc, char* argv[]) { unordered_map<string, string> phoneBook; phoneBook.insert(std::make_pair("Sally...
Click to read more »VTD-XML
Jumat, 2026-07-31 20:03:35import com.ximpleware.*; public class Update { public static void main(String argv[]) throws NavException, ModifyException, IOException{ // open a file and...
Click to read more »