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.009s
<1234567…34>
  • 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
  • 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)…

    ... nowhere.
    [code]
    2 DEF FN t$(n,t,d)
    +VAL$ (("FN t$("
    +STR$ (n-INT ...
    Battle Bunny Battle Bunny August 2013 Sinclair Basic
  • 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
  • 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…

    ... the bit that does the copying) work when a$ ... 10 DIM s$(6912): DEF FN p(a)=PEEK a+ ... /> DEF FN l(v)=v-256*FN h(v): DEF FN h ... (v)=INT (v/256):
    LET udg=FN ... ,FN l(df),FN h(df),FN l(dl),FN ... DEFADD area (where FN variables are defined) ...
    Battle Bunny Battle Bunny April 2011 Sinclair Basic
  • fn bug in basin?Hi. I was just trying to make myself some functions in basin and when i tryed them, the progam stopped on call. So i've tryed this simple thing: 10 …

    ... simple thing:

    10 def fn a(x)=x*10
    20 print fn a(10)

    and ...
    rikokun rikokun September 2011 Sinclair Basic
  • FN nesting error?While playing with FN functions that call assembly, I've found something weird. Check out this code: [code]10 DEF FN f(a,b)=a+b 20 PRINT FN f(FN f(…

    ... this code:
    [code]10 DEF FN f(a,b)=a+b ... , if I change the DEF FN to: DEF FN f(a,b)=a, the ... call.

    [code]10 DEF FN f(a,b)=a+b ...
    20 DEF FN g(a,b)=a+b ... !
    40 PRINT FN f(FN f(2,FN g(3,1)),4 ... !
    100 PRINT FN g(FN g(2,FN g(3,1)),4 ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • more on storing mazesPrompted by Wookiee's escapades, I've been pondering on how to use DATA statements directly for displaying background graphics, thus avoiding the dup…

    ... avoiding the duplication of copying the data into an array ... "n"

    10 DEF FN p(a)=PEEK a+256 ... ):
    DEF FN g(v)=v-256*FN h(v): DEF FN h(v ... )=INT (v/256)
    11 LET udg=FN ... : READ n$: LET datend=FN p(datadd):
    LET ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • quick RAM copy using LET in BASICI'm in the process of reviewing, revising and refining all the programming tips & utility routines which I've posted on this forum over the last eigh…

    ... (or both; or neither, if copying directly between two different segments ... .

    [code]
    10 DEF FN p(a)=PEEK a+256 ... +1):
    DEF FN l(v)=v-256*FN h(v): DEF FN h(v ... )=INT (v/256)
    20 DEF FN ...
    Battle Bunny Battle Bunny July 2013 Sinclair Basic
  • Random-Access to Microdrive FileI am working on a BASIC program to backup a microdrive text-file to standard tape array-file. To backup a text-file from one microdrive to a secon…

    ... .org/forums/discussion/33911/copying-a-screen-in-zx- ...

    [code]
    1 DEF FN p(a)=256*PEEK (a ... REM DPEEK(a)
    2 DEF FN m(n,d)=n-d ... /> 3 DEF FN l(v)=v-256*FN h(v): DEF FN h(v ... )
    1312 DATA FN l(512),FN h(512)
    ...
    mattsteel mattsteel May 2018 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…

    ... FOR - POKE - NEXT loop for copying a large chunk of data ... area used by user-defined FN evaluations. I'd often used ... first I tried using a DEF FN to assign the display file ... I could use LET s$=FN s$(), but I got ... was using a user-defined FN by POKEing DEFADD with ...
    Battle Bunny Battle Bunny 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…

    ... both; or neither, if copying directly between two different segments ...
    [code]
    10 DEF FN p(a)=PEEK a+256 ... br /> DEF FN l(v)=v-256*FN h(v): DEF FN h(v ... )=INT (v/256)
    20 DEF FN ... a>127):
    DEF FN m$(a$,a,b$, ...
    Battle Bunny Battle Bunny April 2011 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 …

    [QUOTE=Battle Bunny;619146]Any DEF FN which has parameters works in ... after passing syntax, so every DEF FN gets treated as having no ... cannot find $CE (which is DEF FN) in the string sometimes). Now ... test it now with simply copying it into your basin R14 ...
    Arda Arda April 2012 Emulators
  • Store and restore attribute valuesI am needing ideas on how to write a machine code routine that will store/restore (more important to restore) attribute values to the 22528 area. I …

    ... just as well as copying the discrete block, given ... POKE 23660,FN g(dd): POKE 23661,FN h(dd)
    ----- BASIC version
    DEF FN p(a)=PEEK a+256 ... br /> DEF FN g(v)=v-FN h(v)*256: DEF FN h(v ... CODE "$",14,0,FN g(attadd),FN h(attadd),0,2 ...
    Battle Bunny Battle Bunny May 2012 Development
  • Writing faster BASICIn terms of structuring BASIC programs, what are the best ways allocate variables, functions, arrays? Any tips. I remember INPUT mag had some suggest…

    ... list copying each line in turn for processing via a DEF FN string ...
    Battle Bunny Battle Bunny January 2014 Sinclair Basic
  • Writing faster BASICIn terms of structuring BASIC programs, what are the best ways allocate variables, functions, arrays? Any tips. I remember INPUT mag had some suggest…

    ... list copying each line in turn for processing via a DEF FN string ... seemed like putting all the DEF FNs at the very start ...
    dmsmith dmsmith January 2014 Sinclair Basic
  • From RAM to dim v$() "video buffer" SPEED UP!Hi! This question is related to "quick RAM copy using LET in Basic" ([url]http://www.worldofspectrum.org/forums/showthread.php?t=44296[/url]). Wel…

    ... shows the BASIC technique for copying from a string to the ... .
    [code] 11 DEF FN a(a$)=0: DEF FN p(a)=PEEK a ... v$(20*32): LET da=FN p(23639)+8
    13 ... RANDOMIZE FN a("a"(1)): LET pa ... you're doing. You're copying 160 bytes, which you say ...
    Battle Bunny Battle Bunny March 2014 Sinclair Basic
  • BASin Release 10a is up...Well, none of my releases ever get far before the inevitable bug fix version... Go grab it at [url="http://homepage.ntlworld.com/paul.dunn4/BASin_…

    ... now ignored (BadBeard)
    Fixed DEF FN statements - not correctly tokenised (Chris ...
    Dunny Dunny June 2004 Emulators
  • Is there much ?Do you think there`s much cooperation, and in fact co-development now goes on within the 8-bit community.. in fact is there any? I know that`s a daf…

    ... a thing or two regarding Def FN and special pokes etc etc ...
    CKay CKay November 2004 Development
  • 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 B(b$)=VAL(CHR$ 196 ... [/i])
    [code]
    DEF FN C$(n)=CHR$ INT (n ... [/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
  • BASin release 12b available for downloadOk, there were a few nasty bugs in the last release, so in fine SPIN team tradition here's a new release that possibly fixes those errors. In this r…

    ... /> Fixed Crisis's bug with DEF FN, and colin's problem with ...
    Dunny Dunny October 2005 Sinclair Basic
  • Lesser used BASIC commandsAre there any interesting articles or books that explore some of the lesser used BASIC commands/functions e.g. DEF FN, IN, OUT etc? The Spectrum BAS…

    Are there any interesting articles or books that explore some of the lesser used BASIC commands/functions e.g. DEF FN, IN, OUT etc?

    The Spectrum BASIC manual only glosses over them without going into a lot of detail.

    Necros.
    Ian Hamilton Ian Hamilton January 2006 Sinclair Basic
  • BASin Release 13 is now availableI'm still at it. BASin is now in it's 13th incarnation (disregarding the inter-version updates) and is now available at [url="http://homepage.ntlw…

    ... links a bit.
    Fixed - DEF FN lines were getting their last ... compatibility meant that REM and DEF FN behaved incorrectly.
    Fixed - REM ...
    Dunny Dunny January 2006 Emulators
  • BASin Release 13 is now available[unashamedly x-posted from Emulators forum] I'm still at it. BASin is now in it's 13th incarnation (disregarding the inter-version updates) and is …

    ... links a bit.
    Fixed - DEF FN lines were getting their last ... compatibility meant that REM and DEF FN behaved incorrectly.
    Fixed - REM ...
    Dunny Dunny January 2006 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…

    A 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 difficulties finding it out myself: does anyone have a good example? Thx.
    Paul van der Laan Paul van der Laan November 2006 Sinclair Basic
  • Firefox (new thoughts)Maybe more people would use Firefox if there was a version for the Speccy! [code] 10 PRINT AT 2, 2; "Press F for Firefox or I for M$IE" 20 LET K$=IN…

    ... GO TO 20
    60 DEF FN M$(IE)=""+M$(IE)+""" is ... evil"
    70 PRINT FN M$(IE)
    REM etc ...
    Where's that AY chip gone... Where's that AY chip gone... November 2006 Chit chat
  • BASIC Keyword ReferenceRealised that the Sinclair Basic section would be a better place for discussion of BASIC keywords, so for reference the old thread is in [thread=2005…

    ... : D RANDOMIZE : K : T
    DEF FN : E : SYM + 1 READ : E ... + V RUN : K : R
    FN : E : SYM + 2 SAVE : K ...
    icabod icabod March 2008 Sinclair Basic
  • Terminal Velocity!Hi, Don't know if I should be posting this sort of thing here, but I read the FAQ and didn't spot any "Don't" rules. So here you have my example of …

    ... "Constant e: ";e
    210 DEF FN h(e,x)=((e^((2 ... ^((2*x))-1))
    220 DEF FN v(a,c,e,g ... *m*g)/(p*a*c)))*FN h(e,(t*(SQR ((g ... =60
    240 LET v=FN v(a,c,e,g ...
    gcallard gcallard May 2008 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
copying 1.8K 2.1K

Related Threads

  • 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…
  • 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 …
  • 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…
  • BASIC Bug: DEF FN after REMHello all,<br /> 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 whe…
  • New Forums at 'Def Guide to ZZAP!64' siteI know that there are some C64 fans and ex-readers of 'ZZAP!64' here, so just to let you know that Iain has added a new style message board to his si…
  • Copying Spectrum tape games to +3 disksIs there an easy way of doing this? I know you can use a multiface 3, but I don't have one of these and they sell for silly money on eBay. I picked u…
  • Campaign for free to air High Def TV on FreeviewThe government are on the verge of selling the analogue tv bandwidth ( if thats what its called ? ) to mobile phone companies, but the decision hasn'…

Related Searches

  • modulo function def fn
  • fuse def fn keyboard
  • def fn usr
  • def fn
  • def fn within a function
  • def fn d
  • 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

Copyright © 2024 World of Spectrum