Search found 79 matches

by Zaphod
Sun 01 Jul 2018, 16:05
Forum: BBC BASIC language
Topic: Calling a Procedure using a Variable
Replies: 13
Views: 7285

Re: Calling a Procedure using a Variable

John, you are welcome but it is always wise to check the manual because I am fallible as some will willingly attest. On the subject of crunching variable names I have made assumptions about what does and does not get crunched in the previous posts based on my experience. Those assumption may not be ...
by Zaphod
Fri 29 Jun 2018, 19:10
Forum: BBC BASIC language
Topic: Calling a Procedure using a Variable
Replies: 13
Views: 7285

Re: Calling a Procedure using a Variable

Can I add a word of caution. When you use EVAL you have to be very careful with variables or the default compiler option of abbreviating variables aka crunching can seriously screw things up. The easiest thing is just not use that particular compiler option and it will work as in the IDE. Or you can...
by Zaphod
Fri 29 Jun 2018, 15:41
Forum: BBC BASIC language
Topic: Calling a Procedure using a Variable
Replies: 13
Views: 7285

Re: Calling a Procedure using a Variable

Sorry to cross in the mail again. EVAL gets what you want but also look at ON PROC methods it may be more suited to your need. The manual has this which is eerily similar. CLS PRINT "Select the action you wish to take:" PRINT "1 Open a new data file" PRINT "2 Add data to the file" PRINT "3 Close the...
by Zaphod
Fri 29 Jun 2018, 15:08
Forum: BBC BASIC language
Topic: Calling a Procedure using a Variable
Replies: 13
Views: 7285

Re: Calling a Procedure using a Variable

Snap!

Z
by Zaphod
Fri 29 Jun 2018, 15:06
Forum: BBC BASIC language
Topic: Calling a Procedure using a Variable
Replies: 13
Views: 7285

Re: Calling a Procedure using a Variable

Try this: PROCdummy pptr% = ^PROC1 REM .... PROC(pptr%) END DEF PROC1 PRINT "Hello" ENDPROC DEF PROCdummy:ENDPROC If you didn't run a PROC (any PROC) before you ran your code you would get a No such FN/PROC. But that is in the manual as well but perhaps not explained too well. The program is only sc...
by Zaphod
Wed 27 Jun 2018, 15:58
Forum: User Interface
Topic: No such system call
Replies: 6
Views: 5039

Re: No such system call

I was intrigued by this and did a bit of digging and "RtlCopyMemory" does not exist as a system call only as a macro nowadays. It was removed by Microsoft because it was deemed unsafe sometime around 2009. The place holder in the dll exists as people found but the call isn't in the recent dll's. It ...
by Zaphod
Tue 26 Jun 2018, 18:35
Forum: User Interface
Topic: GetCaretPos
Replies: 11
Views: 7171

Re: GetCaretPos

Can't you use LBItemFromPt function from that point or am I misunderstanding the problem?

Z
by Zaphod
Tue 26 Jun 2018, 14:21
Forum: Tools and Utilities
Topic: Using ZEEGRID with BBC BASIC
Replies: 4
Views: 7349

Re: Using ZEEGRID with BBC BASIC

The simplest way to prove it works is to write the notification it detects back to the grid somewhere in PROCgridevent. SYS "SendMessage", ZEEGRID1%,ZGM_SETCELLTEXT%,CELL%,STR$event% Quite often the notification number is quickly overwritten by the next notification so does not stick around. To prov...
by Zaphod
Sat 23 Jun 2018, 16:23
Forum: Tools and Utilities
Topic: Using ZEEGRID with BBC BASIC
Replies: 4
Views: 7349

Re: Using ZEEGRID with BBC BASIC

Getting access to the notifications is relatively easy. First you have to get rid of that q$=GET$, GET$ blocks interrupts so you won't get any notifications! The easiest way is probably to replace that code with REPEAT UNTIL INKEY(10)<>-1 in this demo. Next to get the events you can use ON SYS or in...