- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Floating point numbers in batches possible?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2003 07:26 AM
тАО08-21-2003 07:26 AM
I'm well versed in batch logic and lexicals etcetera but mainly for file manipulation.
I know symbols can only hold integers and strings but I really need floating point numbers.
Can anyone help?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2003 09:00 AM
тАО08-21-2003 09:00 AM
Solutionhow about this
CFD002> a = "1.7"
CFD002> b = "2.1"
CFD002> icalc 'a' + 'b'
3.8
CFD002> sh sym icalc*
ICALC == "$PUBBIN:ICALC"
ICALC_OUT = " 3.8"
Icalc can be found at
http://zinser.no-ip.info:8080/www/vms/sw/icalc.htmlx
or
ftp://vms.process.com/ftp/vms-freeware/fileserv/
(the new home of the WKU archive, yes I know I need to update that page)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-26-2003 02:28 AM
тАО08-26-2003 02:28 AM
Re: Floating point numbers in batches possible?
Cheers for the tip with ICALC, it was just the sort of thing I needed. Extra bonus for the trig functions cos I needed them too!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2003 01:01 AM
тАО08-29-2003 01:01 AM
Re: Floating point numbers in batches possible?
This is really another question but I thought I'd continue on this one...
The ICALC utility is great but, when not run interactively it still generates output.
I can't compile C code on the node I use and so cant change ICALC. I know I can divert SYS$OUTPUT into a text file, but is it possible to divert it into nothing like on unix?
If you're wandering what it's for, it to code a rotating wireframe cube made from asterixes on a VT100 terminal through telnet, I've attatched a basic working version if you're interested!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2003 02:41 AM
тАО08-29-2003 02:41 AM
Re: Floating point numbers in batches possible?
I downloaded your file and ICALC; I've compiled ICALC anad run CUBE. I can't understand exactly your problem, perhaps it's follow:
a) You can assingn output to null assign to device NLA0: (I suppose to change assign to *.TMP I've found so run quicly)
b) I've look for source and I've found ICALC can solve cos, sin and other trigonometric funcion.
HTH
Antoniov
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2003 07:37 AM
тАО08-29-2003 07:37 AM
Re: Floating point numbers in batches possible?
$ icalc 4.4 * 3.3
$ sh sym ica*
ICALC == "$PUBBIN:ICALC"
ICALC_OUT = " 14.52"
/user causes the define to be active for the next command invocation, so it is restored automatically after the icalc calculation
Greetings, Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-31-2003 07:49 PM
тАО08-31-2003 07:49 PM
Re: Floating point numbers in batches possible?
That attachment was a zipped vms variable length record file with extention .com.
Which is perfectly fine by me and my vms systesm, but it upsets my billybox.
As I to read it on my pc, Notepad goes all funny.
The freeware 'textpad' that I use instead of notepad at least shows contents in its hex binary view mode.
To really read it I cobbled up a little perl script.
For your entertainment (nospan not supported :-)....
binmode STDIN;
while (read STDIN,$length_word,2) {
# avoid using "S" or "V". just do the math.
($length,$null) = unpack ("CC",$length_word);
$length += $null*256;
last if ($length > 32767);
$read = read STDIN,$line,$length;
# print "$length\t$line\n";
print "$line\n";
read STDIN,$null,1 if ($length & 1);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2003 02:22 AM
тАО09-02-2003 02:22 AM
Re: Floating point numbers in batches possible?
Cheers for the help guys, the nla0: tip was handy, and I've sped up quite a few of my batches with it :o)
To the chap with the perl script, you only had to ask and I would have sent it in windows format! nice script though!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2003 09:25 PM
тАО09-28-2003 09:25 PM
Re: Floating point numbers in batches possible?
$b = 5
$c = 2
$a = (100*b)/c
$show symbol a
a = "250"
If you want to display the value of a the right way you simpley use f$extract to place the comma
$output = "''f$extract(0,1,a)',-
''f$extract(1,2,a)'"
show symbol output
output = "2,50"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2003 10:08 PM
тАО09-28-2003 10:08 PM
Re: Floating point numbers in batches possible?
OpenVMS Developer & System Manager