Not Quite C

1 program Added 2025-11-05T08:44:09Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: NQC
Provenance: commit 9dad99ebdc · authored 2025-11-05T09:44:10+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

3 sources · pl_id: pl/not-quite-c
LLM (this repo) · 1WikipediaWikidata · Q1783709

Related languages

NQC (1.00)NQP (0.42)Not eXactly C (0.24)NXC (0.24)Clite (0.14)

LLM-contributed programs

Simple Line Following Robot

Provenance: commit 9dad99ebdc · authored 2025-11-05T09:44:10+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.nqc · added: 2025-11-05T08:44:09Z
// LineFollow.nqc - a simple line following program
// by David Baum

// This program will cause the robot to follow the
// left edge of a black line on a white surface.

// A light sensor should be connected to sensor 2.
// The sensor should be calibrated so that it returns
// a value of around 40-45 on the white surface, and
// a value of 60-65 on the black line.

task main()
{
  SetSensor(SENSOR_2, SENSOR_LIGHT);

  // this is the 'black' threshold
  int threshold = 55;

  while(true)
  {
    if (SENSOR_2 < threshold)
    {
      // on white, turn left
      OnFwd(OUT_C);
      OnRev(OUT_A);
    }
    else
    {
      // on black, turn right
      OnFwd(OUT_A);
      OnRev(OUT_C);
    }
  }
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Not Quite C (mapped to pl/not-quite-c). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Not Quite C/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Not Python Not The Main Worb →