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

    ... point that it is a recursive running line but it wont ... else than "Break" ??? since its recursive??[/QUOTE]

    You can ... , here's Mike's DEF FN from hell in BASin-friendly ... br />
    [code]
    10 DEF FN a$(n$)=VAL$ ((VAL$ (""""""+("+\#19434 ...
    Dunny Dunny May 2006 Sinclair Basic
  • Why are we here? (At WoS)No, not a deep philosophical question about the nature of life, the universe and human existence. The thread &#8220;what does your partner think of …

    ... never crashed (except for recursive use of DEF FN, if I remember my ...
    ewgf ewgf March 2008 Sinclair Miscellaneous
  • 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…

    The "recursive nibble generation" method (a variation ... seem to work with double recursive functions (functions that call themselves ... it... :)

    [code]10 DEF FN b$(n,d)=VAL$ "STR ... INT (n/d),d/2)+FN b$(n-d*INT ( ... ): ";n
    30 PRINT FN b$(INT (n/16),4 ...
    mcleod_ideafix mcleod_ideafix October 2010 Sinclair Basic
  • 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 ... -2^b>=0)+FN b$(n-(2^b AND ... $=";
    25 LET a$=FN b$(a,15): PRINT a ... />
    I know a working RECURSIVE function like this exist already ... STOP-question.
    A recursive formula in BASIC needs a ...
    Dr BEEP Dr BEEP June 2011 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…

    ... [/URL][/B]
    [B]the recursive soltution for[/B]

    [code]
    1 def fn b$(d)=val$ (("str$ d ...

    [code]
    1 DEF FN b$(d)=VAL$ ((CHR$ 19 ...
    Dr BEEP Dr BEEP June 2011 Sinclair Basic
  • Help with random numbers......Hi all, wonder if anyone can help me... sort of a novice here ... I have been trying to write a simple ish basic program to compare random sets of n…

    ... an example of using a recursive function to do the duplicate ... DEF FN a()=FN r(1+INT (RND*49)):
    DEF FN r(x)=VAL (("FN ... 6
    80 LET a(FN a())=n
    110 NEXT ...
    Battle Bunny Battle Bunny July 2011 Sinclair Basic
  • Help with random numbers......Hi all, wonder if anyone can help me... sort of a novice here ... I have been trying to write a simple ish basic program to compare random sets of n…

    ... an example of using a recursive function to do the duplicate ... DEF FN a()=FN r(1+INT (RND*n)):
    DEF FN r(x)=VAL (("FN ... -1
    80 LET a(FN a())=50-n
    110 ...
    loonix loonix July 2011 Sinclair Basic
  • 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…

    ... have to say that your recursive definition i very very ... [QUOTE=Dr BEEP;544274]1 def fn b$(d)=val$ (("str$ d ... />
    2 DEF FN c$(d,b)=VAL$ (("FN z$(d)" AND ... d=b))
    5 DEF FN z$(d)=CHR$ (d+48 ...
    :smile:

    And FN c$(45648,36) gives Z80 ...
    mattsteel mattsteel September 2011 Sinclair Basic
  • 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…

    ... have to say that your recursive definition i very very interesting ... :

    2 DEF FN c$(d,b)=VAL$ (("FN z$(d)" AND ... d=b))
    5 DEF FN z$(d)=CHR$ (d+48 ... />
    :smile:

    And FN c$(45648,36) gives Z80 ...
    BloodBaz BloodBaz 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(…

    I agree with McLeods explanation. An inner FN with a different name has a private parking place and does not need the hidden storage in the same DEF FN statement. Did known recursive functions escape from this by having the inner FN's as the first element?
    roko roko October 2011 Sinclair Basic
  • those darned recursive functions againI've been stuck on this one all evening. I want to dump out some memory in binary to debug a program. I've got a simple mod 2 division loop to do tha…

    ... , then stick the DEF FN in the middle, replace the "DEF FN...=" with PRINT ... should be handy for debugging recursive DEF FNs.
    Battle Bunny Battle Bunny March 2012 Sinclair Basic
  • Keyboard problem...Hi Folks, I have hit a problem in MRT and I cannot see how to get around it. Please allow me to explain. I have a list of items from which one can…

    ... as GO TO, GO SUB, DEF FN (I think that's all ... beforehand then a self-contained FN would work, but it would ... impossible to use nested or recursive FNs - and using a bunch ... of LETs prior to every FN call isn't very pretty ...
    Battle Bunny Battle Bunny April 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…

    ... ;649088][code]
    10 DEF FN d(o,w,u)=299 ...
    [code]
    10 DEF FN d(o,u)=299.76148 ... />
    [code]
    10 DEF FN d(o,w,u)=299 ... use it.
    its not recursive , or i really mis something ... three EXP functions in that DEF FN, as each of them involves ...
    PrinceGaz PrinceGaz August 2012 Brand new software
  • Project on ZX Spectrum in UniversityHi everyone, I am Max, student of media studies in berlin, and I have to do a little project on the spectrum. I am working on a sinclair zx spectrum…

    ... to write certain forms of recursive function. For example, this function ... as a string:

    DEF FN j$(s,l)=CHR$ PEEK ... (s)+VAL$ (("FN j$("+STR$ (s+1)+","+STR ...
    Battle Bunny Battle Bunny December 2012 Announcements
  • calculator and sinusok, look at the Sysel's routine: [PHP]3 5b00 *s 4 5b00 tabsin = #7000 03 mksin 19.11.1995 Busy soft …

    ... self-modifying code and a recursive function to boot.
    [ ... TO ):
    LET b(i)=FN i(0,LEN n$): LET ... );" ";:
    NEXT i
    2012 DEF FN i(i,j)=VAL (("(CODE ... j)>=""A""))*base^i+FN i(i+1,j-1 ... than n.
    [code] 10 DEF FN h$(n)=CHR$ (INT n ...
    Battle Bunny Battle Bunny January 2013 Development
  • 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 …

    ... was a bug in the recursive version of the Hex2Dec function ... $=h7$ ($5F5E0FF = 99999999)
    3051 DEF FN d(h$)=16^(LEN h ... h$>64))
    +VAL (("FN d(h$(2 TO))+" AND ... minor change, I updated the recursive versions of AND, OR, XOR ...
    Battle Bunny Battle Bunny August 2013 Announcements
  • 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)…

    ... temporary workspace.
    [code] 28 DEF FN T$(n)=STR$ INT (n ... /> STR$ INT (FN V(FN V(FN V(FN V(FN V(n,1800000 ... I did recursive versions of all 11 of the DEF FNs in ... , just for comparison. The recursive versions are usually substantially smaller ...
    Battle Bunny Battle Bunny August 2013 Sinclair Basic
  • User defined function in Sinclair BASICI'm looking to create a user defined function in Sinclair BASIC to add up numbers being input. This is the program without a user defined function be…

    ... . However the function can be recursive and this leads to much ... in rather amazing one-line recursive DEF FNs.

    Unfortunately I ... had a think.

    def fn s(a$)=(a$"" AND VAL ... )) + ((LEN a$ > 1) AND FN s(a$(2 TO)))
    Alcoholics Anonymous Alcoholics Anonymous February 2017 BASIC
  • Go to, gosub or something different?I'm going to write an arcade game in basic. May compile it. In both basic and compiled basic would a goto or gosub be faster? Also if I stored …

    ... SUB stack. Calling a FN is slower as every ... as long as a DEF FN only references its own ... its parameters within its DEF FN extent which is always ... searched first; but a DEF FN is restricted in the code ... a GO SUB routine. Recursive DEF FNs use much more memory ...
    Battle Bunny Battle Bunny August 2017 Sinclair Basic
  • those darned recursive functions againI've been stuck on this one all evening. I want to dump out some memory in binary to debug a program. I've got a simple mod 2 division loop to do tha…

    10 DEF FN f(x) = VAL ("x*FN f(x-1)"(1 TO ... TO 10
    30 PRINT FN f(x)
    40 NEXT ... to 9) which is "x*FN f(x-1)".
    Note ... /> (besides there is a non-recursive formula for factorial which would ...
    i love the z80s i love the z80s October 2019 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
<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