Math - Scripting

Results 1 to 8 of 8
  1. #1
    something Erlend is offline
    MemberRank
    Dec 2007 Join Date
    Oslo, NorwayLocation
    791Posts

    Math - Scripting

    Math Commando is a math-program which allows you to make scripts to the program, which can be loaded inside the program. It acts like a calculator, but the diffrence is that you (as said before) can make scripts to it.

    Screenshots
    Spoiler:
    Screenshot of /help


    Screenshot of a script


    A little scripting tutorial.
    Spoiler:
    Math Commando scripting-tutorial.

    Important: One command per line.

    1. Avaible cmds: ma*, ma/, ma+, ma-, ma_pros1, ma_pros2, ma_pros_sale
    2. T1/T2 (Number 1 / Number 2)
    3. Optional comment on each CMD

    All scripts requires script-information, script-information can be put into the program by typing the following
    commands (ONCE per line).

    [N: Name of the script] and [M: Author of the script]

    The following command will ask the program to multiply 5 with 7 and add the following comment: "5 x 7 is awesome c:"

    "ma*"5"7""5 x 7 is awesome c:"

    I have included a test script which you can learn from, to look how the testscript works
    then write "/script load test" inside the application.


    Examplescript
    Spoiler:
    [N: Tetra s.118]
    [M: Erlend]

    "ma*"400"0,01"34a"
    "ma*"600"0,01"34b"
    "ma*"250"0,01"34c"
    #OPG 35
    "ma*"4000"0,01"35a"
    "ma*"1340"0,01"35b"
    "ma*"95"0,01"35c"
    #OPG 36
    "ma*"500"0,03"36a"
    "ma*"900"0,03"36b"
    "ma*"1500"0,03"36c"
    #OPG 37
    "ma*"200"0,04"37a"
    "ma*"3000"0,04"37b"
    "ma*"90"0,04"37c"
    #OPG 38
    "ma*"500"0,07"38a"
    "ma*"1200"0,07"38b"
    "ma*"36000"0,07"38c"
    #OPG 39
    "ma*"50"0,08"39"


    Download in attachments

    Attached Files Attached Files


  2. #2
    Ginger by design. jMerliN is offline
    MemberRank
    Feb 2007 Join Date
    2,497Posts

    Re: Math - Scripting

    Terrible syntax and pointless to boot?

  3. #3
    something Erlend is offline
    MemberRank
    Dec 2007 Join Date
    Oslo, NorwayLocation
    791Posts

    Re: Math - Scripting

    Whats wrong with the syntaxes?

  4. #4
    :-) s-p-n is offline
    DeveloperRank
    Jun 2007 Join Date
    Next DoorLocation
    2,098Posts

    Re: Math - Scripting

    What's right with the syntax?

  5. #5
    something Erlend is offline
    MemberRank
    Dec 2007 Join Date
    Oslo, NorwayLocation
    791Posts

    Re: Math - Scripting

    Well, theres nothing wrong with them :p

  6. #6
    (oO (||||) (||||) Oo) jM2.me is offline
    MemberRank
    Aug 2009 Join Date
    USA (Fuck Yeah)Location
    2,527Posts

    Re: Math - Scripting

    Why don't you guys advice him how to make syntax better and not bitch?
    Sorry for saying but I mean if you think the syntax is bad, then explain why, and how it would be better to do it.

  7. #7
    Ginger by design. jMerliN is offline
    MemberRank
    Feb 2007 Join Date
    2,497Posts

    Re: Math - Scripting

    We have an accepted syntax for describing mathematical operations. There's a symbolic form where the operands are implied and there's the English form where the operation takes the form of an abstract relation or function.

    For example, addition is simply the use of the '+' operator, equivalently stated as:

    Code:
    a + b
    +(a,b)
    sum(a,b)
    Any of these makes sense and their presentation lends itself to a natural feeling and simplicity of understanding since we already expect these meet a definition of addition that we already know. So barring slight syntactical choices by the authors, one may need only know that operators are used explicitly or implicitly and then can write complex mathematical formulas and algorithms with a calculator. One does not need to memorize a foreign and alien syntax to perform what is already understood to be a basic operation.

    See the calculator example from Bjarne's book for an example on how to process infix notation including IIRC variables.

    Stroustrup: Code Examples

    Scripting or not what you're providing here is mainly useless and nonsensical as you appear in the application to be processing regular infix with localization (the commas instead of periods) but then in a script you process some weird broken and badly designed "math language." This makes no sense. See every major procedural programming language (which is what your scripting language attempts to emulate) -- mathematical operations are evaluated infix with supplemental mathematics libraries and APIs to perform more complicated operations or to perform explicit operations like sum(...). Look at Javascript, PHP, Python, Lua, etc. Very popular and common scripting language that accomplish what is nigh on cryptic in your example with straightforward and pretty much standard syntax.

    Also, you didn't declare a language with this posting and you posted only a binary without virus scanning results. Rule violations ftw.

  8. #8
    something Erlend is offline
    MemberRank
    Dec 2007 Join Date
    Oslo, NorwayLocation
    791Posts

    Re: Math - Scripting

    Oh sorry, its coded in VB.Net

    and ill upload a virus scan later on



Advertisement