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.001s
<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)…

    ... me that the nested and recursive FN methods were both overly complicated ...
    Battle Bunny Battle Bunny August 2013 Sinclair Basic
  • 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
  • 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…

    ... ) I remembered Dr Beep's recursive DEF FN version, but in between ... I'd write a DEF FN to do it ... and despite ... :
    [code]
    100 DEF FN b$(n,s$)
    =s ... $+VAL$ (("FN b$(" + STR$ INT (n/2 ...
    Battle Bunny Battle Bunny March 2012 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…

    ... BASIC would be tortuously slow. Recursive functions are possible, but are ... AND INT FN V(FN V(FN V(FN V(FN V(FN V(FN V(x ... ),2)+INT FN V(FN V(FN V(FN V(FN V(FN V(FN V(y ... STR$ INT (FN V(FN V(FN V(FN V(FN V(FN V(b,128 ... )+STR$ IN…
    chev chev 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…

    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
  • Recursive acronymsBrowsing through Wikipedia (as one does, y'know -- it's so full of itself and What Wikipedia Is Not, strange that it never mentions the three main th…

    ... %29]VISA[/url] is a recursive acronym!  (In the interests of ...
    robert@fm robert@fm April 2007 Chit chat
  • 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…

    ... function defined such as DEF FN g(x, y, p, q ...
    carlinski carlinski December 2007 Development
  • 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 …

    ... 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(…

    ... !
    40 PRINT FN f(FN f(2,FN g(3,1)),4 ... !
    50 PRINT FN f(FN g(2,FN f(3,1)),4 ... !
    60 PRINT FN f(FN g(2,FN g(3,1)),4 ... !
    70 PRINT FN g(FN f(2,FN f(3,1)),4 ... !
    80 PRINT FN g(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
  • 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…

    ... 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
  • 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 …

    ... each parameter in the DEF FN definition. There's code there ...
    Battle Bunny Battle Bunny April 2012 Emulators
  • A Miscellany of Dangerous TipsHere's a selection of ideas for using some of the more obscure system variables which I've found handy on occasion. They can be very convenient if us…

    ... assign them in a DEF FN statement. Space for these variables ... automatically created within the DEF FN statement itself by the BASIC ... used independently of any DEF FN statement, which allows quick RAM ... can be done as a recursive DEF FN.

    Finally, ...
    Battle Bunny Battle Bunny October 2012 Sinclair Basic
  • 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)
    +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…

    ... every parameter of a DEF FN.

    By the time ...
    programandala.net programandala.net August 2015 Sinclair Basic
  • SeBASIC Updated to version 3.2 by aowen...SeBASIC has just received an update!... Version 3.2 is now available, but it'll cost ya!... Its only $5 USD, and can be downloaded from here:…

    ... /> * Fixed a bug in DEF FN recursive functions (thanks to Miguel Jodar ... /> * ZXC3 version excludes the DEF FN fix, and moves the cursor ...
    kgmcneil kgmcneil November 2016 Announcements
  • 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…

    ... 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 ... routine that looks for DEF FN, DATA and (oddly) ... pigs ear of evaluating the FN call!

    ...
    BloodBaz BloodBaz May 2022 BASIC
  • Compiling BasicI'm not good in compiling sinclair basic because i was 15 when i got my first spectrum, and it was the first computer i saw. I wasn't aware of compil…

    It might even be done with a recursive DEF FN. I need to think of the code however.

    Your program would be then

    instead LET A=VAL A$
    it will be LET A=FN V(A$)

    and a DEF FN V(A$)= .... in the begin of the prog.
    Dr BEEP Dr BEEP January 2003 Sinclair Basic
  • Compiling BasicI'm not good in compiling sinclair basic because i was 15 when i got my first spectrum, and it was the first computer i saw. I wasn't aware of compil…

    ... even be done with a recursive DEF FN. I need to think ... /> it will be LET A=FN V(A$)

    and ... a DEF FN V(A$)= .... in the begin ...
    Dr BEEP Dr BEEP January 2003 Sinclair Basic
  • QuickBASICQuickBASIC Emulation: Is it possible to declare and pass global variables throughout a program along with confine a local variable to just a module-…

    ... possible to built your own (recursive) PROCEDURE's in Spectrum BASIC ... />
    I used the DEF FN routine for it as stated ...
    Dr BEEP Dr BEEP June 2004 Sinclair Basic
  • Treachery does anyone have the game map for 'treachery' it was a type in of issue 29 of C&VG I believe it was written by Mike 'lords of Midnight' Singleton a…

    ... and replacing it with a recursive machine-code routine (which was ... a second) accessed via a FN...
    robert@fm robert@fm March 2005 Games
  • Cool BASIC tricks and tips!Following on from Dunny's excellent suggestion of a compendium of BASIC tips + tricks, I believe it would be better to have a topic dedicated to it. …

    ... /> How about those PowerFull DEF FN Statements?
    How far do ... ?

    fals: 10 DEF FN C$(z,y,x,item ...
    Dr BEEP Dr BEEP August 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…

    ... else than "Break" ??? since its recursive??[/QUOTE]

    You can ... any functions (specifically CHR$, TO, FN) that appear in red are ... here's Mike's DEF FN from hell in BASin-friendly ... />
    [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 ...
    ewgf ewgf March 2008 Sinclair Miscellaneous
  • Trying to read in a list of items from DATA statementsThus far I have: data "cherry","apple","banana","grape","orange" But when I read it in using this: FOR X=1 TO 5: READ n$(X): NEXT X It only reads…

    ... $="apples and oranges "
    b$=FN (a$)

    result:
    recursive (but don't let that ...
    Dunny Dunny May 2008 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…

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

    [code]10 DEF FN b$(n,d)=VAL$ "STR ... (n/d),d/2)+FN b$(n-d*INT ( ... ): ";n
    30 PRINT FN b$(INT (n/16),4 ... );FN b$(n-16*INT ( ...
    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…

    ... CLEAR 26000
    9 DEF FN b$(n,b)=(STR$ (n ... -2^b>=0)+FN b$(n-(2^b AND ... a$=";
    25 LET a$=FN b$(a,15): PRINT a ... />
    I know a working RECURSIVE function like this exist already ... your 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
<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
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…
  • 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…
  • Recursive acronymsBrowsing through Wikipedia (as one does, y'know -- it's so full of itself and What Wikipedia Is Not, strange that it never mentions the three main th…
  • 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…
  • Recursive 4-way floodfillHi guys)<br /> <br /> Shortly, I wanna find out whether there's a way to some object. Perhaps some of you have already encountered such an issue whic…
  • fn bug in basin?Hi.<br /> I was just trying to make myself some functions in basin and when i tryed them, the progam stopped on call.<br /> So i've tryed this simple…
  • FN nesting error?While playing with FN functions that call assembly, I've found something weird. <br /> <br /> Check out this code:<br /> [code]10 DEF FN f(a,b)=a+b<b…
  • 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…
  • 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…
  • 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 …

Related Searches

  • recursive
  • modulo function def fn
  • fuse def fn keyboard
  • def fn usr
  • fn defadd
  • def fn
  • def fn within a function
  • fn h
  • upper case fn
  • def fn d
  • bin def fn
  • def fn recursive bug
  • def fn bug
  • recursive function
  • binary recursive function
  • recursive backtrack
  • def fn recursive bin
  • fn usr
  • dr beep s recursive def fn
  • recursive def fn

Copyright © 2024 World of Spectrum