Skip navigation.

Programming talk.

Mostly about euphoria and justbasic.

Tea 4 three on Rotorvägen.

Hello Olofssons!
Thanks and Good Morning.


Script in Cad (Reinforcement)

, ,

PSAVE
ATCHOFF
XHOFF
GRIDV 20
SNAPV 4
SNAPON
:ajarm2
GP xyp1 ^D[ Reinforcement ] Horisontal_upper_bar_left_point............. >
IFERR zjarm2
GP xyp2 ^D[ Reinforcement ] ...horisontal_upper_bar_right_end >
:---calculates horisontal right point--------------------
GETY yp1 xyp1;getx xp2 xyp2;getx xp1 xyp1
:---calculates bend point--------------------------------
GP xyp1b ref xyp1 @2*jkska,-2*jkska
GP xyp2b ref xp2,yp1 @-2*jkska,-2*jkska
:---draw line
GW jkasnam jkafi
APND jkasnam jkak
APND jkasnam jkalage
SHEET;jkasnam
SETLAYER K-ARMERING_ÖK
COLOR jkaf
LSTYLE solid
PTHICK 0.60
LINE xyp1b xyp1;;line xyp1 xp2,yp1;;line xp2,yp1 xyp2b;
:---decides length------------------------------------------
GN L1 xp2-xp1
:zjarm1
GP xyp3 ^D[ Reinforcement ] Scope_line_start_lower.........>
GP xyp4 ^D[ Reinforcement ] ...scope_line_end >
:---calculates point
GETY yp4 xyp4;getx xp3 xyp3;gety yp3 xyp3
:---draw scope line------------------------------------
COLOR 2
PTHICK 0.20
LINE xyp3 xp3,yp4;
:----smallcircle in intersection bar and scopeline
GETX xya xyp3
GETY xyb xyp1
CIRR;jkska*1.2;xya,xyb;
:---calculates length-------------------------------------------
GN L2 yp4-yp3
GN jkant L2/jkaCc
GN jvisa jkant
APND jvisa ø;apnd jvisa jkafi;apnd jvisa c/c;apnd jvisa jkaCc;apnd jvisa - ;apnd jvisa L1
PTHICK 0.0
COLOR jkaf
TSPECH jkska*jktex
TEXTM;jvisa;^D[ Reinforcement ] Place_text_of_bar >
SETLAYER K-ARMERING_NR
ATTRIBM;1;diam;jkaFi;xp2,yp1
ATTRIBM;2;kval;jkak;xp2,yp1
ATTRIBM;3;läge;jkalage;xp2,yp1
ATTRIBM;4;ant;jkant;xp2,yp1
ATTRIBM;5;längd;L1;xp2,yp1
GN jkasum jkant*L1
ATTRIBM;Delsum;summa;jkasum;xp2,yp1
GV jkasum2 jkasum*jkavi/1000
ATTRIBM;Delvikt;delvikt;jkasum2;xp2,yp1
SETLAYER K-ARMERING_ÖK
HIDE K-ARMERING_NR
:-------------calculates weight on each dimension
IFZ jkafi-8 jkvikt8lab
IFZ jkafi-10 jkvikt10lab
GO zjarm2
:jkvikt8lab
IFDEF jkvikt8 jklab1
GV jkvikt8 0
GN jkant8 0
:jklab1
GV jkvikt8 jkvikt8+jkasumuk2
GV jkant8 jkant8+jkant
GO yjarm2
:jkvikt10lab
IFDEF jkvikt10 jklab2
GV jkvikt10 0
GN jkant10 0
:jklab2
GV jkvikt10 jkvikt10+jkasumuk2
GV jkant10 jkant10+jkant
GO yjarm2
:yjarm2
GO ajarm2
:zjarm2
SNAPOFF
GRIDOFF
ECON
PREST
EXITM
User choose and click points(1 to 5) and script draws a bar and it´s scope ,
script calculates number of bars length of bar and user place it on drawing.

Skills in Ruby programming language

# skills in Ruby programming language

print "In which city do you stay? "
STDOUT.flush
var1 = gets

print "What is number of street? "
STDOUT.flush
old2 = gets.to_i

#doing dummy calcs
old3 = old2 * 2
old2 = old3 / 2

print "You stay in " ; print var1
print "and street number is " ; puts old2

#newline from puts
#ruby reigns in linux and windows!


Macro in Cadprogram

MACRO tra
GV qbb ^DStair width - HK cancel:
IFERR qx
:qy1
GV ql ^DStair length- HK treadwidth * ant:
IFERR qx1
GN qa ^DNumber of steps - HK treadwidth:
IFERR qx2
GV qb ql/qa
GO qz
:qx2
GV qb ^DWidth of tread - HK cancel:
IFERR qx
GN qa ql/qb
GO qz
:qx1
GN qa ^DNumber of steps - HK cancel:
IFERR qx
GV qb ^DWidth of tread - HK length of staircase:
IFERR qy1
ECOFF
GV ql qa*qb
:qz
ECOFF
GP qs ^DPoint of start - HK cancel:
IFERR qx
LINE qs <0,ql;
GP qs5 @0,0
LINE qs5 <165,1.5*qb;
LINE qs5 <195,1.5*qb;
GP qsu REF qs <90,qbb/2
GP qsn REF qs <270,qbb/2
LINE qsu <0,ql;
LINE qsn <0,ql;
GP qs4 REF qs <270,qbb/4
LINE qsn qsu;
SELBY1
REPEAT;qs4;qa+1;1;0,0;qb,0
GV qp qa*qb
GP qs6 REF qsn <225,10
SELBYW
GROUP qs6 @qp+20,qbb+20
SELBY1
DRAG qs qs ^D;;
:qx
ECON
SELBYD
ENDM
--This macro draws a staircase
--in Cad2D program

-- console program


-- console program
printf(1,"%s", {"Hello World ! "})

if getc(0) then
end if

Here you can read Critic´s critic of Euphoria,

, ,

Here you can read Critic´s opinion of Euphoria

http://openeuphoria.org/EUforum/index.cgi?module=forum&action=flat&id=104341#unread

that is in some cases my opinion too :star:

Chat euphoria on irc.freenode.net.

Tip of the week!

Chat euphoria on programming languages at irc.freenode.net

There are about 5000 rooms (different programs).

By!

Euphoria alpha 4.0 ( experiment).

Hi!
Do you want to alpha-test a program(Euphoria).

programming language windows
http://linuxbuddhist.net:8080/euphoria.zip

programming language linux version
http://linuxbuddhist.net:8080/euphoria.tar.gz

forum report problem
http://openeuphoria.org/EUforum/

stable version 3.1.1
http://www.rapideuphoria.com/v20.htm

Myself use version 2.4.

Export and public in Euphoria alpha 4.0


Here is a discussion about keywords in programming languages.
http://openeuphoria.org/EUforum/index.cgi?module=forum&action=flat&id=103032#unread

Have you ever used the keyword Mumbo-Jumbo? :smile:

Alright, it's about the keywords: public local global , export and maybe import.

I think that 'export' is a confusing keyword.

Spontaneous , would think it means global.

I met 'export' first time in bash (linux shell script)
and thought, what what what is this!!!

Export PATH EUDIR EUINC , see you!

include Hello

include Hello
include To.Anyone


wordtype wTitle wTitle =
--------

"A program showing my own commands in Eu "&
"can you understand them? "

wordtype wText wText=
--------

"Now I will tell you how many "&
"days remainig to christmaseve. = "

seq s
---
s = dim2d(3,4)
-----

s[3][4] = f_daysBetweenDate(2008,12,2,2008,12,24)
-----------------

-- output to display
prs( wTitle )
---
ny()
--
prs( wText )
---
prg( s[3][4] )
---

wait()
----

include Merry.Christmas
include PS.you_may_not_belive_it_but_all_code_is_correct_euphoria_syntax
include and.produces_a_correct_output_to_console_window
December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31