Rust macros: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

15 October 2024

10 October 2024

  • curprev 02:3302:33, 10 October 2024 Iwiseman talk contribs 6,032 bytes +6,032 Created page with "=Macros= I did macros using YouTube and the course. The first example is the course, the second is YouTube. ==Greatest Common Denominator Macro== Here is the simple example. <syntaxhighlight lang="rs"> macro_rules! gcd { ($a: expr, $b: expr) => { { let mut a = $a; let mut b = $b; while b != 0 { let t = b; b = a % b; a = t; } a } }; } mai..."