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.016s
<1…891011121314…34>
  • Can anyone see a way to speed up the following line of code?Hi Folks, Been looking at bottle necks in my code using BASin's Profiler and the following line (well the 2nd LET statement) is somewhat slow. [COD…

    ... ?
    I dont mean the DEF FN placing in LINE 0 here ... one, put the most used DEF FN ahead.
    Further, longer variable ...
    Paddy Coleman Paddy Coleman 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…

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

    ... 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
  • automatic relocating of non-relocatable codeI was pondering upon the problem of changing absolute addresses used by CALL, JP, etc. when code is moved, without reassembling at the new location; …

    ... my former method of using DEF FN. The changes are that I ...
    Battle Bunny Battle Bunny August 2011 Development
  • Keys redefine routine and key check.I have written some asm code which allows me to redefine keys (for a game etc.), and also allows me to be able to check any keypresses for the redefi…

    ... this:
    [code]
    1 DEF FN b$(b)="00000000"(TO 8 ... LEN STR$ FN b(b))+STR$ FN b(b):
    DEF FN b(b ... )=VAL (("b-INT (b/2)*2+10*FN b ... b))
    10 LET b$=FN b(USR main)
    [/ ... I tried merging the two DEF FNs into one, but that ...
    Battle Bunny Battle Bunny September 2011 Development
  • 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…

    ... />
    [CODE]
    DEF FN b$(b,u)=("" AND USR ... string "0000000000000000" inside the DEF FN, so if you change ...
    [CODE]
    3 DEF FN b$(b,u)=("" AND USR ... 7 DEF FN h(h$)=16*FN n(h$(1))+FN n(h ... its starting address using the DEF FN x(a$).

    mattsteel mattsteel September 2011 Sinclair Basic
  • 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. …

    ... a string variable

    DEF FN x(x$)=PEEK (4+PEEK ...
    mattsteel mattsteel September 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…

    ... typed in as

    DEF FN b$(b,u)=("" AND USR ... />
    but became

    DEF FN b$(b,u)=("" AND USR ...
    mattsteel mattsteel September 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…

    ... its starting address using the DEF FN x(a$).[/QUOTE]

    FN x(a$) entry and a ... small INKEY$ function combined with FN h() which accepted the ASCII ...
    Battle Bunny Battle Bunny September 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…

    ... no reason for combination with DEF FN.
    Still treasures can be ...
    roko roko September 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…

    ... the "2A0B5C......" string in the DEF FN stmt next to the "00000...".
    roko roko September 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…

    ... the "2A0B5C......" string in the DEF FN stmt next to the "00000 ...
    Dr BEEP Dr BEEP September 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…

    ... no reason for combination with DEF FN.
    Still treasures can be ... /> [/QUOTE]
    I found useful DEF FN because all variables are vectorized ...
    mattsteel mattsteel September 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…

    ... br /> [code]
    6 DEF FN n(n$)=CODE n$-CODE ... 7 DEF FN h(h$)=16*FN n(h$(1))+FN n( ... :
    DEF FN l()=LEN a$-1: DEF FN c()=INKEY$= ... /> LET a$(FN l())=CHR$ FN h(a$(FN l() TO ... /> LET a$=a$( TO FN l()):
    PRINT CODE ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • INSTR function...Hi Folks, Another little program that people might find useful: [CODE]100 DIM i(4) 110 LET a$="This is some sample text" 120 LET b$="text" 130 GO S…

    ... position p, defined as a DEF FN plus a *small* (117 ... />
    [CODE]
    1 DEF FN i(n,t$,s$)=USR ... USR 23296
    2 DEF FN n(n$)=CODE n$-CODE ... /> 3 DEF FN h(h$)=16*FN n(h$(1))+FN n(h ... br /> 1025 LET c=(FN h(c$(i TO i ... br /> 2020 LET p=FN i(p,"is",s$)
    mattsteel mattsteel September 2011 Sinclair Basic
  • INSTR function...Hi Folks, Another little program that people might find useful: [CODE]100 DIM i(4) 110 LET a$="This is some sample text" 120 LET b$="text" 130 GO S…

    Here's a recursive DEF FN INSTR one-liner, cunningly contrived ... it in a separate function "FN c(c,o$)" didn't ... work. I thought that maybe "DEF FN c()=c+LEN o$-1 ... .

    [code]
    4 DEF FN i(w$,o$,c)=
    VAL (("FN i(w$,o$,c+1 ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • INSTR function...Hi Folks, Another little program that people might find useful: [CODE]100 DIM i(4) 110 LET a$="This is some sample text" 120 LET b$="text" 130 GO S…

    ... ")
    9 STOP
    20 DEF FN i(m$,s$)=VAL ("0 ... "+("+(1+FN i(m$(2 TO ),s ...
    Dr BEEP Dr BEEP September 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 ... ago. I am afraid that FN is off limits in BASin ...
    Paddy Coleman Paddy Coleman September 2011 Sinclair Basic
  • Any ideas on how to solve this equation?If I have three numbers 10:A:B where A & B are equal +ve integers <10, what formula could I apply to pairs of numbers (A,10) or (10,B) such that the …

    ... function.
    [code]
    1 DEF FN b(n,P1,P2)
    +VAL (("P1*FN P2(INT (n/P2),a ...
    Battle Bunny Battle Bunny September 2011 Development
  • Any ideas on how to solve this equation?If I have three numbers 10:A:B where A & B are equal +ve integers <10, what formula could I apply to pairs of numbers (A,10) or (10,B) such that the …

    ... function doesn't work: [B]FN P2[/B] should be [B ... ]FN b[/B], also [B]P1[/ ... do:

    [CODE]1 DEF FN b(n,p,q)=n ... (n/q)+VAL ("0"+("+p*FN b(INT (n/q),p ...
    Einar Saukas Einar Saukas September 2011 Development
  • Any ideas on how to solve this equation?If I have three numbers 10:A:B where A & B are equal +ve integers <10, what formula could I apply to pairs of numbers (A,10) or (10,B) such that the …

    ... and develop a single recursive DEF FN which could do the ... " parameter in a nested FN b() to convert that result ... .

    [code]
    DEF FN b(n,f,t)

    DEF FN n(n,f,t)=FN b(FN b(n,f ... , really. It uses two DEF FNs rather than one but ...
    Battle Bunny Battle Bunny September 2011 Development
  • INSTR function...Hi Folks, Another little program that people might find useful: [CODE]100 DIM i(4) 110 LET a$="This is some sample text" 120 LET b$="text" 130 GO S…

    [code]
    2 PRINT FN i("hello and hello","ll", ... 1)
    3 PRINT FN i("hello and hello","ll ... ",4)
    4 PRINT FN i("hello and hello","ll ... )
    9 STOP
    40 DEF FN i(m$,s$,p)=VAL ... p+LEN s$-1)=s$)+("+FN i(m$,s$,
    p ...
    Dr BEEP Dr BEEP 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…

    ... /> [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…

    ... :

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

    ... four subordinate functions are:
    FN k$(n) - get character ... ",36,10) gives 2176782350. FN n$("1000000",36,2) gives ... /> [code]
    DEF FN n$(n$,o,p)=FN t$(FN f(n$,o ... ,1),p)

    DEF FN f ... (n$,b,c)=FN m(n$(c ...
    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 …

    ... 1 DEF FN g(v)=VAL "v-FN h(v)*256": DEF FN h ... (v)=VAL "INT (v/256)":
    DEF FN ... PEEK (a+1)":
    DEF FN n(n)=n-CODE " ... 9990 CLS: RANDOMIZE USR VAL "FN p(23637)+96":
    ... LET v=FN p(VAL "16384"): LET ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • 3 lines of funHello! I'm looking for a tattoo to remember forever our fabulous 8 bit era. A part the pictures I posted here [url]http://www.worldofspectrum.org/for…

    ...

    [code]
    10 DEF FN h(n)=(n-48)*(n ...
    Geoff Geoff October 2011 Sinclair Basic
  • Display half a screenWorking in 128 Basic and saving screens to memory via - SAVE! "image" SCREEN$ . Is it possible to display just the top half (or the bottom half) of t…

    ... the screen RAM using the DEF FN tip that was posted a ...
    Paddy Coleman Paddy Coleman October 2011 Sinclair Basic
  • Display half a screenWorking in 128 Basic and saving screens to memory via - SAVE! "image" SCREEN$ . Is it possible to display just the top half (or the bottom half) of t…

    ... copied quickly by using the DEF FN trick which Paddy mentioned to ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
<1…891011121314…34>

Latest Posts

  • I am currently watching.....
    mel the bell on 5:54PM
  • Happy 40th Birthday to the Amstrad CPC464!
    Luny on 5:14PM
  • Your Favorite Magazine Cover Tapes.
    dm_boozefreek on 4:45PM
  • "Late Entries"
    harriusherbartio on 4:00PM
  • How Do You Categorize Your Speccy Software and Games?
    harriusherbartio on 1:34PM
  • Simple Sprite Routine
    dmsmith on 1:25AM
  • Today's BASIC program: visit attribute cells I am interested in, in pseudorandom order
    Paradigm Shifter on April 11
  • How do you share programs online?
    firelord on April 11
  • Celebrity deaths...
    Ælita on April 11
  • Who Has Got The Earliest ZX Spectrum Software?
    harriusherbartio on April 11

HitBox

Word Docs Hits
fuse 6.8K 11.8K
def 11.7K 12.9K
fn 866 4.4K
keyboard 14.1K 21.6K

Related Threads

  • ANNOUNCE: Fuse 0.6.1, libspectrum 0.2.0, fuse-utils 0.6.1I'm pleased to announce the release of the Free Unix Spectrum Emulator (Fuse) 0.6.1, which is now available from its [url="http://www.srcf.ucam.org/~…
  • Keyboard stickers for a DK'Tronics keyboardSee topic.<br /> I know sintech used to sell them, but I can't find them in their shop anymore.<br /> Anyone know another place where to get these pu…
  • 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…
  • Keyboard issue on Fuse for LinuxHi,<br /> <br /> My laptop has only one 'enter' key, though it seems it acts<br /> like it was the numeric pad enter key. So I can do nothing<br /> u…
  • 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 …
  • SAGA 1 Emporer keyboard ->swap-> dk' Tronics keyboardHi,<br /> <br /> Anyone here that would like to swap a SAGA 1 Emporer keyboard for a dk Tronics keyboard?<br /> Without the insides, just the keyboar…
  • 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 /> …

Related Searches

  • fuse onscreen keyboard
  • modulo function def fn
  • fuse 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

Copyright © 2024 World of Spectrum