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.005s
<1234567…34>
  • 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
  • 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
  • Julian Date / Mean AnomolyHere's another bunch of nonsense that (when finished) might be helpful*: [quote] 10 CLS : PRINT AT 0,0;"Please enter the information required:": …

    ... information required:": PRINT
    20 DEF FN a(d,h,m,s ... /60/60/24)
    30 DEF FN b(j,m,d,c ... +c-1524.5
    31 DEF FN c(j)=357.5291+(0 ...
    gcallard gcallard May 2008 Sinclair Basic
  • BASin r14d - Final bugfix for the r14 seriesOk, there's not a great deal to "show" here, as most of the work has been going on "under the hood" so to speak. And there's been a [i]lot[/i] of wor…

    ... keyword - GO TO, GO SUB, DEF FN etc. (Ref)
    Fixed - You ...
    Dunny Dunny December 2008 Emulators
  • 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 ...
    rahtgaz rahtgaz January 2009 Sinclair Basic
  • The best ... beginning with "D"Name (in your opinion) your "Best game beginning with [A to Z, one letter per post]". So, for the letter "D", which do you think are the: [B]Best g…

    ... :[/B] I'd say the DEF FN command, but you have to ...
    ewgf ewgf January 2009 Sinclair Miscellaneous
  • problem with DEFADD storageI have a function: DEF FN t(t$,m,t)=USR t which is called with, for an example: LET bc=FN t("t$()",mcworkspace,mcputt) where, at the time: mcworkspac…

    I have a function: DEF FN t(t$,m,t)=USR ... , for an example: LET bc=FN t("t$()",mcworkspace,mcputt)
    DEF FN t(t$,m,t)=m ...
    Battle Bunny Battle Bunny July 2010 Sinclair Basic
  • storing machine code in BASICApart from putting m/c above RAMTOP, which means that it has to be POKEd or LOADed separately after the BASIC program; or putting it in a REM, which …

    ... br /> [code]
    4 DEF FN p(a)=PEEK a+256 ... br /> DEF FN g(v)=v-FN h(v)*256:
    DEF FN h( ... 5):
    LET newVARS=FN p(23627)+machine_code_length+1:
    " POKE 23627,FN g(";newVARS;")"'
    " POKE ...
    Battle Bunny Battle Bunny August 2010 Sinclair Basic
  • Is this a bug in BASin?Hi Folks, I seem to be getting a lot of issues when trying to use functions with BASin. For example, the following: [CODE]100 DEF FN a(x,y,p$)=COD…

    ... following:

    [CODE]100 DEF FN a(x,y,p$)=CODE ... TO y)
    110 PRINT FN a(3,4,"Paddy")[/CODE ...
    Paddy Coleman Paddy Coleman August 2010 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
  • 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…

    ... br /> 10 DIM s$(6912): DEF FN p(a)=PEEK a+256 ... 1):
    DEF FN l(v)=v-256*FN h(v): DEF FN h(v ... )=INT (v/256):
    LET udg=FN ... 14,0,FN l(df),FN h(df),FN l(dl),FN h( ... searches the DEFADD area (where FN variables are defined) before ...
    Battle Bunny Battle Bunny April 2011 Sinclair Basic
  • checking bits in BASICThe question of manipulating bit patterns in BASIC was raised recently in this [thread=35728]Keys redefine routine and key check[/thread] thread. I s…

    ... also a method using DEF FN (see [post=561279]this ... they both work, the DEF FN wasn't totally satisfying, ... shortage of them) :); the DEF FN definition is shown below. ( ...
    [code]
    1 DEF FN b$(n,a,b,l ... br /> 2 DEF FN l(v)=v-FN h(v)*256: DEF FN h(v ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • saving part of a BASIC programHere's a short routine to save part of a BASIC program. The idea is that it can be merged into a program and then used to save sub-routines, etc. to …

    ... DEF FN b(h$)=16*FN n(h$(1))+FN n(h$(2)):
    DEF FN ... g(v)=v-FN ... h(v)*fg: DEF FN ... h(v)=INT (v/fg):
    DEF FN p ... LET prog=FN p(23635): LET vars=FN p(23627 ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • Find-Fill-Copy functions for BASICThere's not much going on here, so here's three m/code routines to provide some data manipulation functions which are otherwise slow to do from BASIC…

    ... as 'b']
    . eg. FN f("z$()","b",find) -or ... - FN f("z()","",find)
    * ... with value 'b'
    . eg. FN f("z$()","wxyz",fill) -or ... 'b' (may overlap)
    . eg. FN c(22528,22529,127,CHR ... p1[,p2...,pn],r1" or "DEF FN f(p1[,p2...,pn])=USR ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • 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…

    ... been set up for a DEF FN statement, so the routine works ... .

    [code]
    2 DEF FN d$(l$,n)=l$+CHR ... +CHR$ FN g(n)+CHR$ FN h(n)+CHR$ 0+",":
    DEF FN p ... +1):
    DEF FN g(v)=v-FN h(v)*256: DEF FN h(v ...
    Battle Bunny Battle Bunny January 2012 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…

    ... DATA "n"

    10 DEF FN p(a)=PEEK a+256 ... 1):
    DEF FN g(v)=v-256*FN h(v): DEF FN h(v ... )=INT (v/256)
    11 LET udg=FN p ... m: READ n$: LET datend=FN p(datadd):
    LET m ... />
    45 POKE defadd,FN g(udg): POKE defadd+1 ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • Memory move routine?Hi Folks, I have been searching for the thread that covers the memory move routine that uses a$=b$ via DEF FN. I thought it was written by Battle B…

    ... that uses a$=b$ via DEF FN. I thought it was written ...
    Paddy Coleman Paddy Coleman February 2012 Sinclair Basic
  • simplest method to pass a string to m/code?The statement "RANDOMIZE numvar+USR mc" is a simple way of passing a single numeric parameter to a m/c routine, as mc can retrieve numvar from the to…

    ... be taken off again.
    * DEF FN m(s$)=USR mc: LET ... bc=FN m(s$): whereby mc can ... string details from within the DEF FN statement using the DEFADD pointer ...
    Battle Bunny Battle Bunny April 2012 Sinclair Basic
  • Screen2StringFurther to writing that BASIC one-liner to redirect CAT to a string I thought that I'd do a general redirection routine for anything which normally p…

    ... is essentially treated as a DEF FN parameter) it can only be ... /> 2 DEF FN p(a)=PEEK a+256*PEEK (a+1): DEF FN g ... (v)=v-FN h(v)*256: DEF FN h(v ... S",CODE "$",14,0,FN g(sa),FN h(sa),0,0 ... are redirected)
    DATA FN g(sa),FN h(sa):
    ...
    Battle Bunny Battle Bunny May 2012 Sinclair Basic
  • enhanced GOSUB/GOTO (in BASIC)Further to my previous post under "BREAK from GOSUB" here's the two ideas mentioned there put together. Note that to keep it quick it expects the DEF…

    ... it quick it expects the DEF FN r() to be at the ... DEF FN r(g,s,l)=g:
    DEF FN c()=FN p(23621): DEF FN p ... (a)=PEEK a+256*PEEK (a+1):
    DEF FN g ... (v)=v-FN h(v)*256: DEF FN h(v ...
    Battle Bunny Battle Bunny May 2012 Sinclair Basic
  • number padding functionI wrote a number padding function in BASIC a while ago, but when I came to want it again I couldn't find it, so I've done this enhanced [url=http://w…

    ... as well.
    [code]
    DEF FN p$(n,l,r)=STR ... ,0,1) := "1.0"
    FN p$(1,-5,3) := " 1 ... .000"
    FN p$(1,-5,0) := " 1 ... 3,3) := "-00.120"
    FN p$(0,0,0) := ""
    Battle Bunny Battle Bunny May 2012 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…

    ... on RETURN

    llll DEF FN b(a,b,c,d ... /256)
    ....
    GO SUB FN b(val1,val2,opcode,bits ...
    Battle Bunny Battle Bunny June 2012 Sinclair Basic
  • saving time populating large arraysI use a variation on this idea for storing machine code at the end of programs without interfering with LIST, then it occurred to me that it would al…

    ... 0*1 = 1813
    2 DEF FN p(a)=PEEK a+256 ... br /> DEF FN g(v)=v-FN h(v)*256: DEF FN h(v ...
    12 LET vars=FN p(23627)-alen:
    POKE ... 23670,FN g(vars): POKE 23671,FN h(vars):
    FN g(vars): POKE 23671,FN h(vars):
    Battle Bunny Battle Bunny October 2012 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
recursive 215 281
def 11.7K 12.9K
fn 866 4.4K

Related Threads

  • 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…
  • 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…
  • 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…
  • 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…
  • 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
  • recursive fn
  • bin def fn
  • 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
  • recursive def fn

Copyright © 2024 World of Spectrum