The forward slash is the smallest conditional in G-code: one character at the start of a block that hands the block’s fate to a switch. With the block-delete switch off, the line runs; with it on, the control skips the line as if it were not there. That makes the slash genuinely useful for switchable program variations, and genuinely dangerous in programs you did not write, and both halves come from the same mechanism.

How it works

A slash before the block, /G01 X50. F200., marks that block optional. The control’s block-delete switch, also called block skip or optional block skip, decides at runtime: switch off, the slashed blocks execute normally; switch on, they are skipped. The feature is documented across dialects, capable controls offering numbered variants (block skip 1, 2, 3) for several independent slash levels, and the behavior is consistent everywhere, slash plus switch-on equals skipped.

Term you will hearWhat it meansThe behavior
Block deleteThe switch and the featureSlashed blocks run or skip per the switch
Block skip / optional block skipThe same feature, other namesIdentical: terms are interchangeable
Numbered skip (/1, /2)Independent slash levels on capable controlsEach level has its own switch

The legitimate uses

The slash earns its place wherever one program should serve two modes. An optional inspection stop, a program stop you enable for first pieces and disable once the job is proven. A probing or measurement routine run during setup and skipped in production. An optional spring or skim pass for tight-tolerance runs. Debug or verification lines skipped in normal operation. The common thread: the operator selects the mode at the switch rather than maintaining two near-identical files, which is real convenience and real version-control safety, one file, two behaviors, no divergent copies.

The related-but-distinct optional stop, M01, pairs naturally with this thinking, the M00-versus-M01 distinction being structural-versus-situational stops, and block skip extends that situational flexibility from stops to any block.

The trap, and why it is sharp

The same feature turns hazardous the moment a program outlives the reason its slashes were added. A slash makes behavior depend on a switch state that is invisible in the code and frequently undocumented, so an inherited program can run one way with the switch on and another with it off, and an operator unaware the slash exists, or unsure of the switch state, meets the surprise as a skipped tool change, a missing pass, or an inspection stop that never came. This is exactly why block delete sits near the top of that post’s suspect list, and why the error-hunting discipline includes a literal search for slashes: they are silent, switch-dependent, and easy to inherit without a briefing.

The two habits

Writing: comment every slash with its purpose, /M01 (FIRST PIECE INSPECTION STOP), so the next operator knows what the switch controls, the comment-the-why craft applied to the program’s most state-dependent character. Reading: search every inherited program for slashes before running it, confirm the block-delete switch state on the control, and know what each slashed block does in both switch positions. Two minutes of slash-hunting converts the feature from a trap back into the tool it was meant to be.

The slash joins the small family of tape-era format characters, the percent sign, the EOB, the conventions that reward knowing they exist, and like the rest, its danger is entirely in being invisible to someone who does not know to look. The recall layer that keeps slashes visible at reading speed, alongside the reference dialect’s definition, is the standard core drilled free in the 60-second rounds on the G-code practice page.

Sources

Frequently asked questions

What does the slash (/) at the start of a G-code block do?

It marks the block optional: with the control’s block-delete switch off, the slashed line runs normally, and with the switch on, the control skips it. One program can carry switchable variations selected at the switch instead of by editing.

What is block delete versus block skip versus optional block skip?

Three names for the same feature: a switch making slash-marked blocks execute or not. Capable controls add numbered variants for several independent slash levels. Slash plus switch-on equals skipped, everywhere.

What are legitimate uses of the block-skip slash?

Switchable variations: an optional inspection stop for first pieces, a probing routine skipped once proven, an optional skim pass, debug lines skipped in production. One program serves two modes, chosen at the switch.

Why is the block-skip slash a trap in inherited programs?

Because behavior depends on an invisible, often undocumented switch state: a slash placed for a forgotten reason makes the program run differently per switch, surprising an operator as a skipped change or missing pass. Search inherited programs for slashes and confirm the switch.