random-hacks | random things
kandi X-RAY | random-hacks Summary
kandi X-RAY | random-hacks Summary
random things that are useful to me, not necessarily to others
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of random-hacks
random-hacks Key Features
random-hacks Examples and Code Snippets
Community Discussions
Trending Discussions on random-hacks
QUESTION
I'm trying to make a fortan code for displaying a colored ASCII art of 2D graphics in command prompt on Windows 10 systems, like a code distributed in the website below.
https://sites.google.com/site/akohlmey/random-hacks/text-mode-graphics-for-fortran
I have heard that command prompt on Windows 10 partially support ANSI escape sequences, and it is available if we enable the virtual terminal processing option.
There are some examples in C code, but I want to make a function or subroutine to enable ANSI escape sequences by Fortran code. For example, is it difficult to rewrite following simple C function by a Fortran function (or subroutine)?
...ANSWER
Answered 2019-Nov-19 at 06:38It is easy to call a C function from Fortran (hundreds of questions and answers here).
And it is almost impossible to write the above in Fortran, it is systems programming, you would need the right libraries Maybe some compilers supply them, but it is not standard.
Just call your C function from Fortran. The FILE *
argument wonn't be available in Fortran directly, you need to get the pointer in C as well.
After enabling, you can write the sequences very easily How to print in the same position in fortran clear screen in Fortran
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install random-hacks
You can use random-hacks like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page