News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

carot

Started by shankle, January 12, 2015, 02:14:53 AM

Previous topic - Next topic

shankle

Mistake - threw away my BASIC manuals.
I am trying to covert a Basic program from years ago to GoAsm.
I can't find out what the symbol (^) or Carot does.
I think it has to do with an exponential.

a! = (i! * l!) / ((1 - (i! + 1) ^ -m%))
Thanks for any help...

jj2007


shankle

Thank you JJ.
It is definitely an exponent.

Now the problem is how to convert it to GoAsm.
I did look through the help files and didn't see anything about
carot usage. But it is possible I missed it or did not know where
to look.

dedndave

hi Jack

here is a GWBASIC manual - pretty much the same thing

http://www.antonis.de/qbebooks/gwbasman/

top left - chapter 6 gives much of the syntax
besides carot.....

% integer
! single precision float
# double precision float
$ string

shankle

Thanks Dave.

I have got to stop throwing things away.:(

anunitu

That is a nice reference site Dave...

MichaelW

The CRT pow function is easy to use, here in a MASM example:

;=====================================================================================
include \masm32\include\masm32rt.inc
;=====================================================================================
.data
    x REAL8 2.0   
    y REAL8 3.0
    z REAL8 ?
.code
;=====================================================================================
start:
;=====================================================================================
    invoke crt_pow, x, y
    fstp z
    printf("%f\n",z)
    inkey
    exit
end start


8.000000


For the MASM32 libraries the CRT functions have "crt_" in front of the function name to avoid name conflicts. For GoAsm I expect you would need to invoke the function as "pow".
Well Microsoft, here's another nice mess you've gotten us into.