World of Spectrum
  • Categories
  • Discussions
  • FAQ
  • Sign In
Home › Search
Title Search
@title beer Word 'beer' in title
User Search
  • @user admin Only posts by Admin
Text Search
  • @body beer Word 'beer' in the text
Phrase Search
"Hello World" Exact phrase match
Exclude Terms
  • car -red Search cars that are not red
"Or" Searches
  • honda | bmw 'honda' or 'bmw' results
Multi-Field
@(title,body) hello Both contain 'hello'
WildCard
  • hond* civ* Match all with an astrix
Combination
  • @title bmw @user admin
See more supported syntax examples
Search Again :: Adv Search 1000 results in 0.050s
<1234567…34>
  • Confounded DEF FNCan anyone see why this is going wrong? I've been tinkering with it since tea time and got nowhere. [code] 2 DEF FN t$(n,t,d) =STR$ INT (n/t)…

    ... /> [code]
    2 DEF FN t$(n,t,d)
    =STR$ INT (n ... )+(":" AND d=6 AND n>500)
    +VAL$ (("FN t$("
    +STR$ (t/d)+","
    +STR$ (d-4+(8 AND d=6))
    +")" AND ...
    Battle Bunny Battle Bunny August 2013 Sinclair Basic
  • DEF FN DirectivesI am looking at using some machine code functions from the DK Graphics Pack. They are machine code but they are called via Basic with the function de…

    ... the function defined such as DEF FN g(x, y, p, q ...
    carlinski carlinski December 2007 Development
  • Can you improve this recursive DEF FN?I came up with this function to scan strings for characters without needing to use FOR...NEXT and IF...THEN, but it seems rather long-winded. Can any…

    ... ?

    Using:

    DEF FN w(w$,o$,c)=VAL ... (("FN w(w$,o$,c+1)" ... />
    with:

    w$(FN w(w$,o$,1))
    FN w(w$,o$,1)*100).
    Battle Bunny Battle Bunny September 2010 Sinclair Basic
  • BASin v.15 DEF FN bugThe bug would appear to be in "BASSupport.pas : Procedure ProcessDEFFN"; as it's not inserting the 6-byte variable place holder after each parameter …

    ... after each parameter in the DEF FN definition. There's code there ...
    Battle Bunny Battle Bunny April 2012 Emulators
  • Fix for the DEF FN bug of zmakebasSome months ago I discovered a bug in zmakebas: it does not include the 5 bytes required after every parameter of a DEF FN. By the time, the WoS f…

    ... after every parameter of a DEF FN.

    By the time ...
    programandala.net programandala.net August 2015 Sinclair Basic
  • BASIC Bug: DEF FN after REMHello all, Having mused the Spectrum ROM disassembly by Drs Logan ad O'Hara, I wondered about how good ZX BASIC was at locating the DEF FN when call…

    ... BASIC was at locating the DEF FN when called upon.

    [code]
    10 DEF FN a()=10
    20 PRINT ... :
    [code]
    10 REM : DEF FN a()=10
    20 PRINT ... ROM routine that looks for DEF FN, DATA and (oddly) NEXT appears ...
    BloodBaz BloodBaz May 2022 BASIC
  • New Functions for Sinclair BasicA total of 52 new functions can be added to Sinclair BASIC; 26 numeric functions (A-Z) and 26 string functions (A$-Z$). Owing to the internal structu…

    ... i])
    [code]
    DEF FN C$(n)=CHR$ INT (n ... $[/i])
    [code]
    DEF FN D(h$)=(CODE h$(1)-48 ... [/b]()
    [code]
    DEF FN F()=65536-USR 7962
    [code]
    DEF FN H$(n)=CHR$ (INT (n ... [/i])
    [code]
    DEF FN L$(l$)=CHR$ (CODE l ...
    chev chev November 2004 Sinclair Basic
  • Having trouble with some type-insI'm trying to enter some type-ins into BASin but I get into errors I can't handle. Since both type-ins are coming from the same book, it becomes a li…

    ... ]
    // page 150
    130 DEF FN d(s$) = (s$ > "9")*( CODE ...
    rahtgaz rahtgaz January 2009 Sinclair Basic
  • New SpecBAS available - Procedures and Functions.Go here: [url]http://www.zxspectrum4.net/forum/viewtopic.php?f=6&t=17[/url] And get the latest if you're interested. I've added procedures and func…

    Go here:

    [url]http://www.zxspectrum4.net/forum/viewtopic.php?f=6&t=17[/url]

    And get the latest if you're interested. I've added procedures and functions (DEF PROC and speccy-style DEF FN).

    D.
    Dunny Dunny December 2010 Sinclair Miscellaneous
  • storing machine code in BASICA couple of years ago I posted a routine for storing machine code between PROG & VARS, based on an idea in Toni Baker's "Mastering Machine Code". Thi…

    ... .

    [code]
    2 DEF FN d$(l$,n)=l$+CHR$ 14 ... $=FN d$("A",va)+FN d$("B",FN g(nv))+FN d$("C",FN h(nv))+FN d$("D",FN g(n))+FN d ... $("E",FN ...
    Battle Bunny Battle Bunny January 2012 Sinclair Basic
  • Chompston Mazes in SpecBASAfter the discussion in ASH-II's Pacman thread, I checked out the link there about generating 2D Pacman style mazes. This one was quite good fun, …

    ...
    [code]
    30 DEF FN d=INT(mind+INT(1+(RND ... +RND*LEN e$,d$=d$+CHR$ VAL e ... TO),l$=l$+CHR$ FN d:
    LET x ... call our function "FN d" from earlier to get ... y$(f),d(f)=CODE d$(f),l ... />
    Ordinarily I'd probably just use the information ...
    Dunny Dunny October 2015 Sinclair Basic
  • New Functions for Sinclair BasicA total of 52 new functions can be added to Sinclair BASIC; 26 numeric functions (A-Z) and 26 string functions (A$-Z$). Owing to the internal structu…

    ... "optimised" version):

    [code]DEF FN D$(n)=CHR$ (INT n+7 ... ]DEF FN H$(n)=FN D$(n/4096)+FN D$(FN V(n,4096)/256)+FN D$(FN V(FN ... V(n,4096),256)/16)+FN D$(FN ... V(FN V(FN V ...
    monty.mole monty.mole November 2004 Sinclair Basic
  • New Functions for Sinclair BasicA total of 52 new functions can be added to Sinclair BASIC; 26 numeric functions (A-Z) and 26 string functions (A$-Z$). Owing to the internal structu…

    ... 9")[/code]:

    [code]DEF FN D(H$)=(CODE H$(1)-48 ... faster calculation:

    [code]DEF FN H$(n)=CHR$ (INT (n ... 9)+48)+CHR$ (INT (FN V(FN V(n,4096),256)/16 ... gt;9)+48)+CHR$ ((FN V(FN V(FN V(n,4096),256 ... ),16))+7*(INT FN V(FN V(FN ...
    monty.mole monty.mole November 2004 Sinclair Basic
  • Recursive functionsA while ago Phil demonstrated a nice example of recursiveness in a DEF FN function. Sadly it doesn't appear to be online anymore and I have difficult…

    10 Def Fn D$(n,s$)=val$ (("s$+fn D$(n-1,s$)" And N>0)+("""""" And N=0))
    20 Print Fn D$(10,"abc")
    Dr BEEP Dr BEEP November 2006 Sinclair Basic
  • Having trouble with some type-insI'm trying to enter some type-ins into BASin but I get into errors I can't handle. Since both type-ins are coming from the same book, it becomes a li…

    ... :-

    [code]
    130 DEF FN d(s$)=(s$>"9")*(CODE ...
    Digital Prawn Digital Prawn January 2009 Sinclair Basic
  • Copying a SCREEN$ in ZX BASIC in 1 second?!Following on from the revived "[thread=20207]Saving a complete SCREEN$ in BASIC[/thread]" thread (although Arjun really only needed a suitable POKE i…

    ... -256*FN h(v): DEF FN h(v)=INT (v/256)
    20 DEF FN d ... (a)=PEEK a-(64 AND PEEK a>127):
    DEF FN ... m$(a$,a,b$,b,l)=FN d$(a$,a,l,0)+","+FN d ... $(b$,b,l,1)+")":
    DEF FN d ...
    Battle Bunny Battle Bunny April 2011 Sinclair Basic
  • SE Basic Type-ins^Pete suggested creating a sticky thread for SE Basic discussion. I thought a Type-ins thread might also be useful. Up to the mods if they want to ma…

    ... are four channels (A to D). The first three channels ...
    C, Db (C#), D, Eb (D#), E, F, Gb (F#), G ... />
    Notes in channel D are played with the BEEP ... :

    [code] 10 DEF FN D(o,n)=n-VAL "37 ... For example [b]BEEP 1, FN D(4, C)[/b] would play ...
    chev chev April 2011 Sinclair Basic
  • Copying a SCREEN$ in ZX BASIC in 1 second?!Following on from the revived "[thread=20207]Saving a complete SCREEN$ in BASIC[/thread]" thread (although Arjun really only needed a suitable POKE i…

    ... -256*FN h(v): DEF FN h(v)=INT (v/256):
    DEF FN d(a ... )=a-(64 AND a>127)
    3 DEF FN m ... $(a$,a,b$,b,l)
    =FN d$(a$,a ... ,INT(l/256),1)+")":
    DEF FN d$(a$,a,b,l,m ...
    Battle Bunny Battle Bunny April 2011 Sinclair Basic
  • A "bit" of a curiosityHaving to use a bit of m/code to do the AND in that key check function, I was prompted to revisit the "AND,XOR,OR,...for BASIC" topic and came up wit…

    ... = val0 = number to complement
    d = bits = number of bits to ... RETURN

    llll DEF FN d(a,d,g,v)=g:
    RESTORE ... /256)
    ....
    GO SUB FN d(val0,bits,nnnn,0)
    nnnn FOR p=0 TO d-1:
    LET ba2=INT ...
    Battle Bunny Battle Bunny June 2012 Sinclair Basic
  • Cricket: Duckworth/Lewis CalculatorIdeal for any one-day cricket match which uses the Duckworth/Lewis method to calculate the target score if there is an interruption to play. The alg…

    ... :) The critical function is the DEF FN at the very start of ... time consuming:

    10 DEF FN d(o,w,u)=299.76148 ... calculations):

    9900 REM DEF FN d(o,w,u)=(245/(1 ...
    PrinceGaz PrinceGaz August 2012 Brand new software
  • Cricket: Duckworth/Lewis CalculatorIdeal for any one-day cricket match which uses the Duckworth/Lewis method to calculate the target score if there is an interruption to play. The alg…

    ... Crisis;649088][code]
    10 DEF FN d(o,w,u)=299.76148 ... a plain w in your def fn, but only use it ...
    [code]
    10 DEF FN d(o,u)=299.76148*w ... it def fn d(o,w+1,u)

    [code]
    10 DEF FN d ... three EXP functions in that DEF FN, as each of them ...
    PrinceGaz PrinceGaz August 2012 Brand new software
  • Spectrum Utility Routines Compendium (pending)I couldn't make up my mind into which section to put this, so it's ended up here for some tenuous reason. I haven't forgotten about this. I've been …

    ... $=h7$ ($5F5E0FF = 99999999)
    3051 DEF FN d(h$)=16^(LEN h$-1 ... h$>64))
    +VAL (("FN d(h$(2 TO))+" AND LEN ...
    Battle Bunny Battle Bunny August 2013 Announcements
  • Elliptical ChallengeSubsequent to the recent "Graph Plot" thread, I wrote this general purpose ellipse drawing routine which will plot (although it doesn't actually use …

    ... /> 3 DEF FN x(x,y,d)=FN a(x,y,FN r(d)):
    DEF FN a ... /> 4 DEF FN y(x,y,d)=FN b(x,y,FN r(d)):
    DEF FN b ...
    5 DEF FN r(d)=d/180*PI
    6 DEF FN Battle Bunny Battle Bunny January 2014 Development
  • Elliptical ChallengeSubsequent to the recent "Graph Plot" thread, I wrote this general purpose ellipse drawing routine which will plot (although it doesn't actually use …

    ... at run-time you'd need to pre-plan ... 3 DEF FN x(x,y,d)=FN a(x,y,FN r(d)):
    DEF FN ... 4 DEF FN y(x,y,d)=FN b(x,y,FN r(d)):
    DEF FN ... /> 5 DEF FN r(d)=d/180*PI
    6 DEF
    Battle Bunny Battle Bunny January 2014 Development
  • Double height text...<p>Is here any good routines for printing a font double height?</p><p>I've concocted this ridiculous routine but I'm sure it can be done much better.…

    ... />
    ;DEF FN d(d$,r,c)=USR DoubleHeight
    ;LET bc=FN d(d$,r,c ... ): REM print d$ AT r,c ...
            ld   a,(ix+6)        ;  =d$ length (1
    Battle Bunny Battle Bunny June 2015 Development
  • Double height text...<p>Is here any good routines for printing a font double height?</p><p>I've concocted this ridiculous routine but I'm sure it can be done much better.…

    ... /> ;DEF FN d(d$,r,c)=USR DoubleHeight
    ;LET bc=FN d(d$,r,c ... ): REM print d$ AT r, ... de),a          ;twice
            inc  d
            inc  hl
    ... />         inc  hl              ;HL=next d$ byte address
            dec  ...
    Battle Bunny Battle Bunny June 2015 Development
  • Akalabeth gamei found now that someone ported an ansi-basic game (coded in 1979?) to msx-basic - what about a zx-spectrum basic version of it? ;) https://plus.goo…

    ...
    Functions:
    [code]
    DEF FN d(w,x)=INT ((x-w ... X pixel coord
    DEF FN e(y,z)=(175-z ... Y pixel coord
    DEF FN p(a)=PEEK a+256 ... a,a+1.
    DEF FN r(a)=8001
    ... X pixel coordinate
    DEF FN y(y)=175-y: HPLOT ...
    Battle Bunny Battle Bunny August 2016 Sinclair Basic
<1234567…34>

Latest Posts

  • Where to Buy the New or Fairly Recent , Excellent ZX Spectrum Games Software?
    Your Spec-chum on 1:34PM
  • i am currently listening to........
    mel the bell on 11:34AM
  • Mis-labeled cassette titles or a name change?
    harriusherbartio on 11:06AM
  • Ways to preserve Speccy Tapes in the loft
    harriusherbartio on 10:58AM
  • Fixed Speccy Software. And which games remained unfixed?
    harriusherbartio on 10:47AM
  • Minor British Sports that did become games on the ZX Spectrum
    harriusherbartio on 10:30AM
  • How to return to basic properly from ASM
    Paradigm Shifter on 1:54AM
  • Frankie's ZX Spectrum Digouts
    Zup on April 8
  • Elusive Strategy Games done by the Smaller or less Prolific Software Houses.
    harriusherbartio on April 8
  • 1992 Spectrum Software
    harriusherbartio on April 7

HitBox

Word Docs Hits
def 11.7K 12.9K
fn 866 4.4K
d 129K 175.1K

Related Threads

  • How to play 3-D MS games Blade Eagle and Maze Hunter in 2-D ?I looked at a few cheat sites; perhaps they don't consider it cheating to play 3-D Master System games in 2-D.<br /> <br /> How do I play these games…
  • DEF FN DirectivesI am looking at using some machine code functions from the DK Graphics Pack. They are machine code but they are called via Basic with the function de…
  • RIP Dave Arneson, co-creator of D&D[url]http://news.bbc.co.uk/1/hi/entertainment/7994444.stm[/url]<br /> <br /> [quote][B]Role-playing games pioneer dies[/B]<br /> <br /> Dave Arneson,…
  • one tv show that you'd wish they'd re-shownot seen it for years, but I used to watch indelible evidence (it used to be on bbc2) years ago.. I thought it was really good, but alas it never got…
  • Can you improve this recursive DEF FN?I came up with this function to scan strings for characters without needing to use FOR...NEXT and IF...THEN, but it seems rather long-winded. Can any…
  • BASin v.15 DEF FN bugThe bug would appear to be in "BASSupport.pas : Procedure ProcessDEFFN"; as it's not inserting the 6-byte variable place holder after each parameter …
  • Multiface One MF I and Plus D +D and Spectrum 48kHi,<br /> <br /> I have an 48k Speccy. And a Plus D Interface.<br /> <br /> Now I want to use it together with a Multiface One, <br /> but it seems I…
  • Confounded DEF FNCan anyone see why this is going wrong? I've been tinkering with it since tea time and got nowhere.<br /> [code]<br /> 2 DEF FN t$(n,t,d)<br /> …
  • Fix for the DEF FN bug of zmakebasSome months ago I discovered a bug in zmakebas: it does not include the 5 bytes required after every parameter of a DEF FN.<br /> <br /> By the tim…

Related Searches

  • modulo function def fn
  • fuse def fn keyboard
  • def fn usr
  • def fn
  • def fn within a function
  • bin def fn
  • def fn recursive bug
  • def fn bug
  • def fn recursive bin
  • def fn library
  • def fn v
  • def fn gosub fast
  • def fn battlebunny
  • def fn fast
  • def fn look for
  • spaghetti def fn
  • dr beep s recursive def fn
  • dr beep def fn
  • def fn trick
  • def fn copying

Copyright © 2024 World of Spectrum