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.014s
<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…

    ... via Basic with the function defined such as DEF FN g(x, y ... bytes following the CALL nn function need to contain the parameters ...
    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…

    I came up with this function to scan strings for ... br />
    Using:

    DEF FN w(w$,o$,c)=VAL ...
    with:

    w$(FN w(w$,o$,1))
    function on its own will return ... (eg. GO SUB 1000+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
  • 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)
    function to be simply: DEF FN t(t$,m ...
    Battle Bunny Battle Bunny July 2010 Sinclair Basic
  • that "listing variables during runtime" thingWell, I did eventually finish this, but with my meds playing up I don't have much time each day that I can spend at the computer, so it's taken rathe…

    ... don't want the listing function there are elements of the ... to be called from the function:
    DEF FN s$(r,k)=STR ...
    Battle Bunny Battle Bunny November 2013 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…

    ... />
    [code]

    BIN(string)
    DEF FN B(b$)=VAL b ... ][/quote]


    BIN(string)

    DEF FN B(b$)= VAL ...
    Dr BEEP Dr BEEP October 2008 Sinclair Basic
  • 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 ... Y pixel coord
    DEF FN p(a)=PEEK a+ ... a,a+1.
    DEF FN r(a)=8001
    ... emulate Apple-II RND function.
    DEF FN x(x)=INT (x ... X pixel coordinate
    DEF FN y(y)=175-y: HPLOT ...
    Battle Bunny Battle Bunny August 2016 Sinclair Basic
  • what does the USR command actually stand for?im sure its an acronym, if i remember rightly. ____ sub routine?

    ... it as a user-defined function DEF FN a(p,q) = USR [i ...
    John Elliott John Elliott June 2019 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…

    ... priority; for example, the MOD function should normally occur first. Where ... /> [b]BIN[/b]([i]string[/i])
    [code]
    DEF FN B(b ... /> [b]BIN$[/b]([i]posint8[/i])
    [code]
    DEF FN B$(b ... ]FREE[/b]()
    [code]
    DEF FN F()=65536-USR 7962
    chev chev November 2004 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 ... nested calls to the same function, then there are combinations of ... same function in a nested call.

    [code]10 DEF FN f ... ,b)=a+b
    20 DEF FN g(a,b)=a+b ...
    mcleod_ideafix mcleod_ideafix October 2011 Sinclair Basic
  • stuck on recursive functionI want this function to PEEK 'l' bytes from memory starting at 's' and return them as a string, but however much I fiddle about with quoting and pare…

    I want this function to PEEK 'l' bytes from ... it to work?

    DEF FN j$(s,l)=CHR$ PEEK ... (s)+VAL$ "FN j$(s+1,l-1 ...
    Battle Bunny Battle Bunny February 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…

    ... a number padding function in BASIC a while ... padnum.asm]PadNum[/url] function in assembler. As ... /> [code]
    DEF FN p$(n,l,r)=STR ... := "1.0"
    FN p$(1,-5,3) := " ... 1.000"
    FN p$(1,-5,0) := " ...
    Battle Bunny Battle Bunny May 2012 Sinclair Basic
  • Function works in SpecBAS but not BASinSo, is there any reason why this user defined function works in SpecBAS but not BASin? [code] 10 DEF FN m$(a$,n1,n2)=a$(n1 TO n2) 20 LET a$="The…

    So, is there any reason why this user defined function works in SpecBAS but not BASin?

    [code]
    10 DEF FN m$(a$,n1,n2)=a$(n1 TO n2)
    20 LET a$="TheManInTheMoon"
    50 PRINT FN m$(a$,12,15)
    60 STOP
    [/code]
    Richey Richey May 2016 Sinclair Basic
  • New Compo IdeaI've had this idea and would like to know what do you think about it. I think that most of us here know how to code in BASIC. The problem with Specc…

    This is what I've compiled so far:

    [quote]Resources
    =========

    * Make all caps
    ---------------

    You can turn CAPS LOCK on or off using a simple poke to 23658:

    POKE 23658,8: REM CAPS ON
    ...
    na_th_an na_th_an April 2005 Development
  • numbers to binaryHi everyone, I have looked through the manual and have found nothing. How do you change a number to binary easily? I know you can go binary to decim…

    ... 5 CLEAR 26000
    9 DEF FN b$(n,b)=(STR$ (n ... 20 RANDOMIZE : CLEAR : LET a=BIN 11011011: PRINT "a=";a'"a ... br /> 25 LET a$=FN b$(a,15): PRINT ... off the 16 chr BIN shows, with the expected ... I know a working RECURSIVE function like this exist already, who ...
    Dr BEEP Dr BEEP June 2011 Sinclair Basic
  • hash function permutation tableI'm using a simple Pearson hash function to generate keys for a $(103,6) array using a 256-byte permutation table. How do I arrange the entries in th…

    ... char *strings[] = {
    "BEEP", "BIN", "BORDER", "BRIGHT", "CAT", "CIRCLE", " ... CLS", "CONTINUE",
    "COPY", "DATA", "DEF FN", "DIM", "DRAW", "ERASE", "FLASH", " ... }

    /* The hash function */
    unsigned char perf_hash( unsigned ...
    Kweepa Kweepa January 2014 Development
  • hash function permutation tableI'm using a simple Pearson hash function to generate keys for a $(103,6) array using a 256-byte permutation table. How do I arrange the entries in th…

    ... char *strings[] = {
    "BEEP", "BIN", "BORDER", "BRIGHT", "CAT", "CIRCLE", "CLEAR ... CLS", "CONTINUE",
    "COPY", "DATA", "DEF FN", "DIM", "DRAW", "ERASE", "FLASH", " ... }

    /* The hash function */
    unsigned char perf_hash( unsigned ...
    Kweepa Kweepa January 2014 Development
  • Decimal to Binary stringHi all, Anyone got a less labour intensive BASIC routine than this? Example:- take 170 and convert to a string "10101010" take 4 and convert to a s…

    ... /> 40 IF n=BIN n$ THEN GOTO 60 ... using an user function:
    [code]10 DEF FN b$(n)=(" ... 5 RANDOMIZE
    10 DEF FN b$()=STR$(INT (RND*2 ... FN b$()+FN b$()+FN b$()+FN b$()+FN b$()+FN b$()+FN b$()+FN ... b$()
    40 IF n=BIN ...
    mcleod_ideafix mcleod_ideafix August 2014 Sinclair Basic
  • Finished with my dice rolling programTook me all day but I'm rather proud of it, simple though it is. Its up at Dropbox if anyones interested https://www.dropbox.com/s/qdgtfc0zyy94hxm…

    ... , due to the embedded function tokens in lines 2 and ... +"(a/2))+")
    * change "BIN" in line 40
    to ... />
    [code]
    1 DEF FN p(a)=PEEK a+256 ... LET u$=CHR$ (128+VAL ("BIN "+v$+w$)):
    PRINT AT ...
    Battle Bunny Battle Bunny July 2017 BASIC
  • How to improve my program using oversized numbersI'd like my dice program to print out the number four times bigger than normal if possible. Anyone know how to do this? Or I could write a sub rou…

    ... , due to the embedded function tokens in lines 2 and ... +"(a/2))+")
    * change "BIN" in line 40
    to ... />
    [code]
    1 DEF FN p(a)=PEEK a+256 ... LET u$=CHR$ (128+VAL ("BIN "+v$+w$)):
    PRINT AT ...
    Battle Bunny Battle Bunny July 2017 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
bin 3.7K 6.1K
function 4.3K 6.5K
def 11.7K 12.9K
fn 866 4.4K

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…
  • SpecBAS INT function vs Spectrum INT functionDunny's SpecOS (SpecBas) vs Normal Spectrum Basic.<br /> <br /> INT function<br /> <br /> The Spectrum rounds -ve INT values down (e.g. INT -2.2 = -3…
  • 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…
  • need helpw with speccy i found in a binToday what a find, walking past a wheely bin I saw an atari box, after more investigation I uncovered a wood panel atari and a speccy plus leads for…
  • 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…

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