--- title: "DEF FN: Spectrum-Style User-Defined Functions" type: "article" slug: "def-fn-spectrum-style-user-defined-functions" url: "http://localhost/article/def-fn-spectrum-style-user-defined-functions/" markdown_url: "http://localhost/article/def-fn-spectrum-style-user-defined-functions.md" published_at: "2026-03-14T14:06:31+00:00" modified_at: "2026-03-14T14:06:31+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "Reprint of the DEF FN section from the Sinclair Spectrum User's Guide, supplied by Bob Orrfelt who noted the 2068 manual is inferior on this topic. Covers defining numeric and string functions, functions with multiple or no arguments, and includes exercises demonstrating FN behavior versus built-in functions." category: - name: "Timelinez" slug: "timelinez" taxonomy: "category" url: "http://localhost/category/periodicals/timelinez/" post_tag: - name: "BASIC (programming language)" slug: "basic-programming-language" taxonomy: "post_tag" url: "http://localhost/tag/basic-programming-language/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Sinclair ZX Spectrum" slug: "zxspectrum" taxonomy: "model" url: "http://localhost/model/zxspectrum/" - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Bob Orrfelt" slug: "bob-orrfelt" taxonomy: "indiv" url: "http://localhost/indiv/bob-orrfelt/" publication_r: id: 21571 title: "Timelinez" type: "periodical" url: "http://localhost/periodical/timelinez/" authors_r: - name: "Bob Orrfelt" slug: "bob-orrfelt" taxonomy: "indiv" url: "http://localhost/indiv/bob-orrfelt/" volume: "5" issue: "2" issues_articles: - id: 38847 title: "Timelinez v5 n2" type: "issue" url: "http://localhost/issue/timelinez-v5-n2/" pages: "270" pubdate: "February 1987" archive_link: false --- # DEF FN: Spectrum-Style User-Defined Functions Reprint of the DEF FN section from the Sinclair Spectrum User’s Guide, supplied by Bob Orrfelt who noted the 2068 manual is inferior on this topic. Covers defining numeric and string functions, functions with multiple or no arguments, and includes exercises demonstrating FN behavior versus built-in functions.