Forums Register Login

How to write a dot file?

+Pie Number of slices to send: Send
Let's say if I want to create a dot file that print this graph in Java, how do i go about it?


I'm starting with this:

+Pie Number of slices to send: Send
Wikipedia has some basic information, but the authoritative source is probably http://www.graphviz.org/doc/info/lang.html. I'm not aware of an existing Java library for this.
+Pie Number of slices to send: Send
 

Ulf Dittmer wrote:Wikipedia has some basic information, but the authoritative source is probably http://www.graphviz.org/doc/info/lang.html. I'm not aware of an existing Java library for this.




I did this:


but kept getting:
Error: <stdin>:1: syntax error near line 1
context: digraph program >>> 5 <<<

What Syntax error?
+Pie Number of slices to send: Send
Check the language syntax - program 5 is not a valid ID.
+Pie Number of slices to send: Send
 

Ulf Dittmer wrote:Check the language syntax - program 5 is not a valid ID.



I took the space between "program" and "5" out and it worked.

But we were asked to make it program 5. "The first line should state "digraph program 5". I'm not sure what to do about that.
+Pie Number of slices to send: Send
See the language spec for what constitutes an ID - there's a way to do that.
+Pie Number of slices to send: Send
 

H Johong wrote:But we were asked to make it program 5. "The first line should state "digraph program 5". I'm not sure what to do about that.


Talk to whoever gave you the assignment and explain the problem that you get if you make the first line literally "digraph program 5". Maybe it's just a mistake in the assignment.
Those are the largest trousers in the world! Especially when next to this ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 3828 times.
Similar Threads
Buffered Writer and Print Writer
Sequence of proper wrapping selection(File I/O doubt)
Best Way to Write an Array To A File
How to make downloadable Word Document with Apache POI?
how to create a graph representing a big tree(parents and children are known)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:28:00.