Hi all, I have been attempting to use BASIC's RND function to generate a number between 0 and 14 in a weird attempt to use the stronghelp manual, I tried to use Highest% = 14 tmp_int% = RND(Highest%) but the manual says it generates a number between 1 and INT(n) (Highest% in this case) in VisualBASIC I can remember generating a number between any to any (integer wise) using something like: int_temp = RND(int_Lowest,int_Highest) so int_Lowest could have been -50 ect how would I do this in BBC BASIC as I cannot find any reference to this kind of function Cheers

0 |

10/12/2007 10:41:15 AM

> Subtract a constant? > > Eg, > > Highest% = 14 > tmp_int% = RND(Highest%)-2 > > will generate a number between -1 and 12. Hmm didn't think of that! :) thanks! > > Best not to capitalise your variables. Damn! better change my progs now then ;@)

0 |

10/12/2007 10:59:49 AM

>> in VisualBASIC I can remember generating a number between any to >> any (integer wise) using something like: > >> int_temp = RND(int_Lowest,int_Highest) > > An equivalent to the VB function you describe[1] would be: > > DEF FN_VBRND(lowest%,highest%)=RND(highest%-lowest%+1)+lowest%-1 > > [1] Which doesn't seem to be what I remember it being in VB, but > never mind. :) My memory must be failing :P was over 7 years ago since I last used a random generator!

0 |

10/12/2007 11:41:18 AM

Ste (news) wrote: > In article <4f309fbd4bsteve@revi11.plus.com>, > Ste (news) <steve@revi11.plus.com> wrote: >> SYS "CryptRandom_Word" TO rnd% > ^^^^ > word% of course >> word% = ABS(word% MOD range%) > > Steve > cool! cheers to all that helped, I will try them out one by one :@) Michael

0 |

10/12/2007 1:49:47 PM

US-TX-Austin: Sr. Lead Consultant, Client/Server Visual Basic, ASP, SQL Server; (45338114407) ============================================================================================= Position: Sr. Lead Consultant Reference: SMC01419 Location: Austin TX Duration: C-P Skills: Demonstrated leadership exp and the ability to assume a leadership role in a team with minimal supervision. Excellent client relationship skills including negotiation and expectation management. 5+yrs Client/Server and/or Interne...

The perspex keyboard strip from my BBC B has gone AWOL. Does anyone have a spare one that they'd like to part with? I'm in Australia so of course I'll cover postage. :-) Thanks ...

Hey guys I'm working on a matlab problem for school and I had a couple questions about this function I wrote. It's supposed to use the "divide and average" method to find the square root of a number whether it is positive, negative, or zero and display it with the error. Is there a more correct way to get the answer for the negative square root than just multiplying by 1i in the output rtanderr? Also, this method gives the correct answer when I run it but the format of the answer is weird. This is what it gives me: rtanderr4 = 0 + 2.000000000000000i ...

Please, dear friends, how do I find zeros of a function f with constraints, for example f = f(x) solution x: a < x < b tolX = 1d-7 (example) Thank you "Marcio " <marciobarbalho@eq.ufrn.br> wrote in message <gbcu99$e5b$1@fred.mathworks.com>... > Please, dear friends, how do I find zeros of a function f with constraints, for example > > f = f(x) > > solution x: a < x < b > > tolX = 1d-7 (example) How do you find a zero of a function? Had you bothered to try this one simple command: lookfor zero matlab itself would have shown you t...

Hi, I am trying to pass arguments to a function being executed by timer() function. Right now, I am using global variables and it works fine. But is there a way to do it without global variables? Thanks. GS <premgrps@gmail.com> wrote in message <d26b96e2-5e4b-41e4-bed8-0554f0c3259a@p9g2000vbb.googlegroups.com>... > Hi, > > I am trying to pass arguments to a function being executed by timer() > function. Right now, I am using global variables and it works fine. > But is there a way to do it without global variables? The additional argument can be passed in...

Hello, I'm trying to use pdbsuperpose, but getting odd error messages. Even trying the built-in demos fail with the same errors. For example, when running the "molviewerdemo", the demo starts right but then aborts, like this: EDU>> molviewerdemo initHelixRes = 23 endHelixRes = 34 ??? Undefined function or method 'procrustes' for input arguments of type 'double'. Error in ==> pdbsuperpose>localDoTransform at 394 [d, z, tr] = procrustes(bk1AtomCoords, bk2AtomCoords, 'reflection', doReflect, 'scaling', do...

I have a very basic question on register allocation, the answer to which I cannot find in any textbook. Suppose you have a code that consists of 4 instructions before register allocation, and registers are all virtual, like in SSA format. The first operand is the destination, the remaining two operands are the sources. The architecture I have in mind is a textbook pipelined RISC, like the one you find in H&P architecture books. 1. add R0, R1, R2 2. add R3, R4, R5 3. add R6, R7, R8 4. add R9, R0, R10 Suppose after constructing an interference graph, the register allocator decided R0 must...

Hello, I try to make more use of exceptions. One question which came to my mind is when to use the no-throw guarantee or not. Consider this: void do_something_harmless() throw() // good practice? { ... } void do_something_harmful_but_will_handle_it() throw() { ... } My feeling is that only functions (and ctors/dtors) whom bodies contain the catch em all statement "catch(...)" i.e { try { /*danger!*/ } /*other catch statements*/ catch(...) { } } should be decorated with throw(). Am I right? Thanks, -- Maik On Jan 14, 1:41=A0pm, Maik <Beckmann.M......

Greetings all, I'm not a programmer, but am a sysadmin for the Mac users in my company. One of our unix programmers (who uses a Mac for her daily work) is starting to program for OSX, and asked me a question that I'll forward to this group. "How does one implement drag and drop in a program?" If this is too incomplete a question, I can ask her for more info. Thanks, DOD dano <dano45@spamcop.net> wrote: > I'm not a programmer, but am a sysadmin for the Mac users in my company. > > One of our unix programmers (who uses a Mac for ...

Had the cables swaped around the wrong way in the back of the Roland :) No worries, most of us have done that. JB "Eddie Crismond" <none@none.none> wrote in message news:vpivv5i09sqpfa@corp.supernews.com... > Had the cables swaped around the wrong way in the back of the Roland > > :) > > "JB Seattle" <shnoozle8@hotmail.com> wrote in message news:lthmb.916$RQ1.602@newsread3.news.pas.earthlink.net... > No worries, most of us have done that. > JB Thanks :) its easy to do. ...

Thomas Philips wrote: > The following program passes parameters (inluding another function) > into a function. >=20 > def f(myfunc,m=3D3,*numbers): > sumSquares=3Dmyfunc(*numbers[:m]) > print sumSquares >=20 > 1. When I run it, Python gives me the following error message: > Syntax error. There's an error in your program: *** non-keyword arg > after keyword arg The "keyword arg" in your function signature is the arg "m=3D3". Any = args appearing after it must also be given default values, which *numbers doesn't do. My recommenda...

ICT, Computer Science and RaspberryPi on the BBC I spotted a 4-5 minute piece all about how the lack of teaching computer science in school is hindering the UK Computer games production market on FREESAT/SKY BBC News Multiscreen (It will probable be there for the rest of today!) They interviewed the head of eidos, google and Dave Braben who demonstrated the RaspberryPi! Some or all of it was apparently shown on Newsnight last night and there is a cut down version available from: http://news.bbc.co.uk/1/hi/programmes/newsnight/9612063.stm More in a blog and a lot of Discussion at http://www....

Sean, Needs["CombinatoricaGraphics`CombinatoricaGraphics`"] lg = Graph[{ {{1, 2}}, {{2, 3}}, {{3, 2}}, {{3, 1}}, {{1, 4}}, {{1, 4}}, {{1, 5}}, {{1, 5}}, {{4, 5}}, {{4, 2}}, {{4, 2}}, {{5, 2}}, {{5, 2}}, {{5, 4}}, {{5, 4}}}, {{{0.0, 1.5}, VertexLabel -> a1}, {{0.0, 0.0}, VertexLabel -> b2}, {{0.5, 0.75}, VertexLabel -> c3}, {{-0.5, 0.75}, VertexLabel -> d4}, {{-1.5, 0.75}, VertexLabel -> e5}}, EdgeDirection -> On] I would redefine the graph. Maybe there is an easier way to do this. edges = Edges[lg]; MakeGraph[Range[5], MemberQ[edges, ...

Hello. I'm getting a better outline of what's available and the differences between the different options, such as FPGAs and CPLDs. Although, I've just come across Alteras "Nios II Embedded Processor" and to be honest it's thrown me off completely. - What is a soft-core processor? - It seems that Nios II isn't a physical product I buy, it appears to be an emulator running on top of any FPGA (Stratix, Cyclone etc...)? - Programming the Nios II is done through the Nios II IDE, although this uses C/C++? Is this then converted into a netlist (along with the Nios cor...

Hi There, I have question in regard to Laguerre function. How can we use this function in Matlab? Can we use Maple's function in Mathlab? Thanks, Maryam Mehdi bahonar wrote: > I have question in regard to Laguerre function. How can we use this > function in Matlab? Possibly this file exchange submission: http://www.mathworks.com/matlabcentral/fileexchange/15916 > Can we use Maple's function in Mathlab? Yes, if you have the appropriate license from Maple to interface with Matlab and you use the right magic calling sequence. Walter Roberson wrote:...

I want to make a plot with the following data: X = [12 19 26] Y = [5 22 13] Z = [503 6589 4563] I want to trace z=f(x,y) but not in 3D plot (so I don't want to use plot3 function in matlab) >>help name_of_function please Is this surf? I wait your answers please! Sprinceana wrote: > I want to make a plot with the following data: > > X = [12 19 26] Y = [5 22 13] Z = [503 6589 4563] > > I want to trace z=f(x,y) but not in 3D plot (so I don't want to use > plot3 function in matlab) > >>> help name_of_function please > > Is this surf? >...

I really, really want a handful of 'true' global functions, ones that can be called from anywhere without requiring importing. So I added it to the 'builtins' of Python, and it appeared to work. :-O Will this have unintended side-effects? :-D Take a look: def traceme(s): print "trace:", s import types def BuiltInFunctions(): callables = (types.BuiltinFunctionType, \ types.BuiltinMethodType, \ types.CodeType, types.FunctionType, \ types.GeneratorType, \ types.MethodType, \ ...

I am learning HTML for the first time taking a self teaching class though my local Community College. Normally this college rocks and has some of the best resources and down to earth teachers that pick books that acutally help folks. Well they failed and my book take more logic jumps that Stephen Hawkins! :D So my ultimate question is as follows: How do I created a function with the following information provided: Create a fucntion named Mquote that contains the single parameter, Qnum. My apologies for such little information. I am sure its my oversight that I am unable to locate the answ...

I still don�t get it - what is the advantage of C ? I can program anything in BASIC V2 on a C64, does C have any advantages over BASIC V2 ? Seems to be more cryptic than BASIC to me. "Ralf Dieholt" <zaltorlin@yahoo.se> wrote in message news:7a376da1.0402220328.20fdc517@posting.google.com... > I still don�t get it - what is the advantage of C ? Portability, efficiency, readability, in that order. > I can program anything in BASIC V2 on a C64, does C have any > advantages over BASIC V2 ? Yes. > Seems to be more cryptic than BASIC to me. Then use BASIC if you w...

Hi, New google groups created to share and discuss about QEngine Web Functional testing. And We WELCOME you all to join, share and discuss about QEngine. http://groups-beta.google.com/group/qengine_webfunctional?hl=en Thanks, Anand Hi Anand Thanks for you Info, Whether the qengine support team will answer in this group. Whether we need to pay for the queries asked here, If I not updated yearly support and maintainance, you will answer my questions?. How frequent I will be answered? regards. ...

Hello, I'm working on a project where I have a function u(w,p) = log_10(1 + w*log_2(1 + p*a)) - q * w * log_2 (1 + p*a). The variables q and a are constants, and w and p are optimization variables. 'q' is roughly 1.5 and 'a' is around 6 x 10^20. The range of 'w' is 3.1 x 10^9 to 10.6 x 10^9 and the range of 'p' is 0 to 560 x 10^-6. When I plot u(w,p) with respect to w (and keep p constant), the function is concave and it is straightforward finding the maximum w. However, when I plot u(w,p) with respect to p (keeping w constant), because I am subtracting t...

hi, I'm learning common lisp using sbcl. To study both the terminal IOs and the loop macro, I started with what I thought would have been easy: a simple echo function within an infinite loop. It looks like this: (defun echo () (loop (format t (read-line t)))) But then definning this at the REPL and then calling (echo), i never get the formatted output. What am I misunderstanding ? -Nicolas On 7 Feb 2007 01:45:25 -0800, nicolas.edel@gmail.com tried to confuse everyone with this message: >hi, > >I'm learning common lisp using sbcl. To study both the terminal IOs >and ...

US-TX-Austin: Glovia Functional Analyst, Data migration/conversion, ProIV; 6-9M (45326032401) ============================================================================================= Position: Glovia Functional Analyst Reference: SMC01724 Location: Austin TX Duration: 6-9M Skills: Direct experience in converting to Glovia, specifically: data migration and data conversion. Some technical ProIV expertise Scope: Client currently moving from a legacy ERP system (Chess) to Glovia. They are looking for ...

Hi all! =20 I am learning about the new procedure FCMP in SAS 9.2 under Windows. I = use proc fcmp to write my own function NORMAL. I know that there is a = SAS own function NORMAL() which calculates normally distributed random = numbers. But I couldn't use my own function, SAS always uses ist own, = without hint or message in the log =20 Here's the code I used: =20 PROC FCMP OUTLIB=3Dsasuser.funktionen.paket; FUNCTION normal(zahl); RETURN (zahl*2); * simply multiply the value zahl with two; ENDSUB; RUN; OPTIONS CMPLIB=3Dsasuser.funktionen; data zufall; do i=...

from historical data that I collected, i divide the data into 100 bins and count the frequency for each bin, and that's my empirical distribution, is there a Matlab function that allows me to draw randomly from that empirical distribution? thanks Luna Moon <lunamoonmoon@gmail.com> wrote in message <cd707e7c-01a4-4649-af1e-0fd10371aa66@w29g2000vba.googlegroups.com>... > from historical data that I collected, > i divide the data into 100 bins > and count the frequency for each bin, > and that's my empirical distribution, > is there a Matlab functio...