Jump to content



Photo
- - - - -

Classpad BASIC Standard Library


  • Please log in to reply
99 replies to this topic

#81 Orwell

Orwell

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 777 posts
  • Gender:Male
  • Location:Paris - France

  • Calculators:
    Casio AFX 1.02 / Casio ClassPad 300

Posted 18 September 2005 - 07:01 PM

So there is finally a game developper for CPLua ;)
But this is not the good topic to discuss about that, we should return to the appropriate subject :P

I you need a translate, you can ask me... or Orwell : he speaks French very good! B)

It would be a real pity if a spoke English better than French :lol2:

#82 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 18 September 2005 - 10:16 PM

So here they are ;) My Lua Programs
The comments are in French... Sorry! :unsure:
I you need a translate, you can ask me... or Orwell : he speaks French very good! B)
There are some screenshots:

I don't need a translation, I can read french very well. But I cannot download your programs. Whenever I try, the modem hangs :blink:. Anyway, I can see the well-known Tower of Hanoi, the "classic" Breakout, and 3D pictures. I'm not interested on games, but I want to see your code organization. The algorithm for solving the Tower of Hanoi problem has some interest as well, since it is based on recursion.

#83 2072

2072

    Casio over god

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1565 posts
  • Gender:Male
  • Location:Somewherebourg
  • Interests:Alternative states of consciousness, programming, making things work the best they possibly can.

  • Calculators:
    AFX2 ROM 1.02, CFX-9940GT+, FX-180P-Plus

Posted 18 September 2005 - 10:43 PM

Killburn: Try to upload it to the filesharing :nod:

#84 omegavirus

omegavirus

    Casio Freak

  • Members
  • PipPipPipPip
  • 150 posts
  • Gender:Male
  • Location:Morelia, M?xico

  • Calculators:
    ClassPad 300

Posted 19 September 2005 - 01:48 AM

I really need a traslation please, I only speak a little bit of english and my native languege spanish :P

#85 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 19 September 2005 - 06:44 PM

Killburn: Try to upload it to the filesharing :nod:

:arrow: Lua Program Set 1

omegavirus >> Please tell me what you don't understand... Sorry, now I can't see my programs, so I can't help you :(
If your native language is spanish, maybe you could help me to make a translation of KaosGenerator. I use Multi language support, but the only languages I know are French and English (and a bit German, but I don't know how to say "fractal" in German :roflol: )

#86 betoe

betoe

    UCF Spanish Translator

  • [Legends]
  • PipPipPipPipPipPipPip
  • 846 posts
  • Gender:Male
  • Location:Guadalajara/Mazatlan, Mexico.
  • Interests:Electronics, SW development, automotive. Swim->bike->run

  • Calculators:
    Algebra FX2.0 (R.I.P.), Classpad 300

Posted 20 September 2005 - 08:33 PM

About the translation i would like to help, anyway i put it in another topic (Project: kaos Generator). If its french -> spanish, i really have several troubles with french, but lets talk about it firs. Cya.

#87 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 20 January 2006 - 11:32 AM

Hi,
A nice function that stdlib must contain is something named for example BoldFont, that gets a text and returns that text written by variable letters.
ie It converts "Hello, World!" to "Hello, World!"
It is very useful for writing titles.
Thanks.

p.s Why there isn't a full documentation on the stdllib?

#88 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 23 February 2006 - 09:56 AM

A nice function that stdlib must contain is something named for example BoldFont, that gets a text and returns that text written by variable letters.
ie It converts "Hello, World!" to "Hello, World!"
It is very useful for writing titles.
Thanks.


Like this? http://kilburn.free.fr/title.mcs

title(src,dest)
src is the string to convert.
dest is the name of the variable in which you want to put the converted string.

Example:
title("Hello World","title1")
Print title1


;)

#89 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 01 March 2006 - 12:23 PM

Nice, thanks... I don't want to make you disappointed but I think that we must let the others to use it. Because I no longer use CP-Basic, now I always use Lua. ;)

#90 Blutorange

Blutorange

    Newbie

  • Members
  • Pip
  • 1 posts

  • Calculators:
    Classpad 300

Posted 01 March 2006 - 02:38 PM

:arrow: Lua Program Set 1

omegavirus >> Please tell me what you don't understand... Sorry, now I can't see my programs, so I can't help you :(
If your native language is spanish, maybe you could help me to make a translation of KaosGenerator. I use Multi language support, but the only languages I know are French and English (and a bit German, but I don't know how to say "fractal" in German :roflol: )

fractal is just "Fraktal" in german ;)
My mother tongue is german so i could help you a bit in translating your program into german :)

Blutorange

#91 Kilburn

Kilburn

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 491 posts
  • Gender:Male
  • Location:France
  • Interests:Blah

  • Calculators:
    FX-7500 G
    ClassPad 300

Posted 01 March 2006 - 07:27 PM

I no longer use CP-Basic, now I always use Lua. ;)


Yes, CP-Basic is rotten. :D

I don't want to make you disappointed but I think that we must let the others to use it.


What do you mean? Making a stdlib for Lua? Why not... :)

#92 Behnoud

Behnoud

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 338 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    CP 300+ OS2.2/
    FX 3600 pv/
    FX 115 s/
    FX 602P

Posted 01 July 2007 - 07:22 PM

I have two different questions:
1- what do you do here, what is discussion about??
2- how I can learn Lua?
3- what is the most powerful programming language for CP?
3- what is the easiest programming language for CP?

#93 PAP

PAP

    Casio Overlord

  • Members
  • PipPipPipPipPipPipPip
  • 681 posts
  • Gender:Male
  • Location:Somewhere in Europe.
  • Interests:Computer Algebra, Numerical Analysis.

  • Calculators:
    ClassPad 300 (plus an old Casio model, with only a few Kb ram).

Posted 03 July 2007 - 10:37 PM

1- what do you do here, what is discussion about??

This is an old effort to make CPBasic better by adding "standard" library functions. I expressed my opinion about such an effort about two years ago. I said then that CP Basic is very poor and extremely slow, so this effort was a nice try, but pointless; CPLua is so poor, so that there is no hope to make it useful by adding "library" functions written in CP Basic (in fact, you can't even define serious CP Basic functions, because the language itself is very very limited). Even after OS 3 release, nothing has been changed; CP Basic remains poor and extremely slow.
As you can see, all posts concerning CPBasic standard library are well aged. It seems that nobody is taking CPBasic seriously today, and I'm not surprised at all.

2- how I can learn Lua?

A question definitely :offtopic:. There are some manuals for Lua, you can find them in the CPLua topic, not here.

3- what is the most powerful programming language for CP?

Another :offtopic: question. Anyway, the answer is very short: CPLua, without a doubt.

3- what is the easiest programming language for CP?

It depends on what you mean by "easiest". Some people may not agree, but I think CPLua is easier to learn than CP Basic. Anyway, even if it's not, in practice you don't have a choice here.

#94 McCoy

McCoy

    Casio Addict

  • Members
  • PipPipPip
  • 68 posts
  • Interests:play around with figures.

  • Calculators:
    CFX - 9850 GB PLUS,Classpad 330, TI-89 Titanium.

Posted 29 June 2008 - 11:57 PM

Here's a suggestion for a rounding function that rounds up or down to a given number of decimal positions

round(x,n) = int(abs(x)*10^n+0.5)/10^n*signum(x)

where
x := the variable to round
n := number of decimal positions

--- EDIT ---
You might want to include a test for x=0, since signum(0) would return undefined..
A new function could look like this:

round(x,n) = piecewise(x,int(abs(x)*10^n+.5)/10^n*signum(x),x)


This is amazing.By the way, is it the same as the fround(x,n) or sround(x,n) commands?

#95 hellas1

hellas1

    Newbie

  • _Members
  • Pip
  • 21 posts

  • Calculators:
    TI-89 Titanium, HP 49g+, HP 50g

Posted 30 June 2008 - 04:17 PM

Hi all,

The previous post is cool!

I have the ClassPad 330 and it states that it gives decimals to Nth number when you choose a specific 0 to 9 decimal mode.

How do I access or use/install fround(x,n) & sround(x,n) and What are these commands used for?

Thanks a lot,
hellas1

#96 McCoy

McCoy

    Casio Addict

  • Members
  • PipPipPip
  • 68 posts
  • Interests:play around with figures.

  • Calculators:
    CFX - 9850 GB PLUS,Classpad 330, TI-89 Titanium.

Posted 01 July 2008 - 12:15 PM

you can acces these on the soft keyboard(main -keyboard-cat.)or just by typing fround or sround.e.g to round up 2008.69 to one decimal place ,type fround(2008.69,1) EXE ans=2008.7

#97 hellas1

hellas1

    Newbie

  • _Members
  • Pip
  • 21 posts

  • Calculators:
    TI-89 Titanium, HP 49g+, HP 50g

Posted 01 July 2008 - 05:54 PM

Hi McCoy,

Thanks for the fround & sround info.

But...what about round(x,n)?

IS it the same as fround & sround?
hellas1

#98 McCoy

McCoy

    Casio Addict

  • Members
  • PipPipPip
  • 68 posts
  • Interests:play around with figures.

  • Calculators:
    CFX - 9850 GB PLUS,Classpad 330, TI-89 Titanium.

Posted 02 July 2008 - 01:37 AM

No worries Hellas1. round(x,n)..mmm let's see. well i'm not sure if this command does exist on other calculators but i'm roughly certain that we don't have it on cp or not at least on cp 330.So i don't know whether it's the same or different from those.What I know is that when i want to round down/up certain number to a specific digits, i use fround(, and when i want to round up/down a number to whatever sig.figs i want , then i use sround(.
There're are cp experts here who can help you better though.
thank you.

#99 hellas1

hellas1

    Newbie

  • _Members
  • Pip
  • 21 posts

  • Calculators:
    TI-89 Titanium, HP 49g+, HP 50g

Posted 02 July 2008 - 03:52 AM

Hi McCoy,

Thanks for your insight.

No offense taken regarding the "bug" issue.
Just trying to help people who bought the CP 330 actually RELY on it.

I'll keep everyone posted.
hellas1

P.S. Anybody know about the round(x,n) command and if anyone can make it for the CP 300/330 IF it's superior to our fround & sround commands?

Thanks,
hellas1

#100 RJPedro

RJPedro

    Newbie

  • Members
  • Pip
  • 7 posts

  • Calculators:
    casio classpad 300 ; casio FX 880 P

Posted 07 November 2008 - 11:13 PM

Hello Everybody

I’m Portuguese Civil Engineering student and I’m having problems doing a interpolation, can any of you help me.



By the way do you know if there are program’s for Civil Engineering for CP



RJP


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users