[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

suffix .TXT , yes an xy-question / java-script, my problem with

Thanks allthe people of the xylist who send me some info to find
solution to my java-problem

Since , as i asume, none or a few, xy-list users are interested
in the solution i do not want to bother them with that
thats why i attached it as an .txt file (xywrite made of
course) for those who want to know.

By the way, and this is "yes an xy-question",
how to suffix automaticly all my xy-files with .txt??

{I programmed? windows to open all files having a suffix .txt
with xywrite (editor.exe)}

i now realise the suffix by hand
say typing (BC) ne filename.txt (XC)
and i often forget to add the .txt

Carel (if you didn't know, Dutch for Charles)
I found out that there is an not mentioned method in the original documentation for Javascript
a plain and simple method called toString wich provides integer conversion to binary (2) octal (8)
decimal (10) and hexadecimal
quit simple:
var integer =0XFFCC99
string = integer.toString (xx)
where xx is the modus 2,8,10 or 16
thus string = integer.toString (16) will covert to a hexadecimal string

it seems that ther is an bug inthis toString
if you are using window-95 (or lower) or netscape 3.01 (or lower
besides that the toString did return only lowercase characters and i am used (early senventy's) to
see hexadecimal-notation in capital-characters

o i decided not to use it because i dont know what versions of software my vieuwers are using
(not that it is so important what i have to tell them bu nevertheless i want my site working in a
proper way

i found out something about bitwise-operands and i wrote a program in js to give the correct
it may be not willing the price for beautifull programming, nor be the shortest way, but it works
(i stopped programming for about 25 years, so if you see a better/shorter, even more elegant way;
please tell me)

below my test version of the js-program (t.i. the function called hextostring given 1 parametre, the
the returns are the global variables:
var hexstringr1
var hexstringr2
var hexstringrr
var hexstringg1
var hexstringg2
var hexstringgg
var hexstringb1
var hexstringb2
var hexstringbb
var hexstringrrggbb

these names speak for themselves since the problem was related to the collors rrggbb

to try outyhe js
alter/change the FEDCBA value inthe value you want and run the ts1.html

my be it is slow
at least on my pc (only 200 Mhz)

see you