All Projects → victorsndvg → Forex

victorsndvg / Forex

Licence: lgpl-3.0
Fortran User Defined Exceptions Handler

Programming Languages

fortran
972 projects

Projects that are alternatives of or similar to Forex

Ruby
The Ruby Programming Language [mirror]
Stars: ✭ 18,713 (+109976.47%)
Mutual labels:  object-oriented
Primrose
A syntax-highlighting text editors that renders to an HTML5 Canvas
Stars: ✭ 451 (+2552.94%)
Mutual labels:  object-oriented
Moose
Multiphysics Object Oriented Simulation Environment
Stars: ✭ 652 (+3735.29%)
Mutual labels:  object-oriented
Monkey
Interpreter with support for class, linq, sql, net, http, fmt, json and A realtime syntax highlighting REPL.
Stars: ✭ 347 (+1941.18%)
Mutual labels:  object-oriented
Globjects
C++ library strictly wrapping OpenGL objects.
Stars: ✭ 431 (+2435.29%)
Mutual labels:  object-oriented
Conception
Conception was an experimental project, looking for ways to make software development more efficient.
Stars: ✭ 534 (+3041.18%)
Mutual labels:  experimental
Goby
Goby - Yet another programming language written in Go
Stars: ✭ 3,296 (+19288.24%)
Mutual labels:  object-oriented
Ring
Innovative and practical general-purpose multi-paradigm language
Stars: ✭ 716 (+4111.76%)
Mutual labels:  object-oriented
Wordpress Plugin Skeleton
A WordPress plugin skeleton built using object-oriented principles and the MVC pattern.
Stars: ✭ 434 (+2452.94%)
Mutual labels:  object-oriented
Lwan
Experimental, scalable, high performance HTTP server
Stars: ✭ 5,520 (+32370.59%)
Mutual labels:  experimental
Chrome Vs Code
A web browser integrated in VS Code editor tabs. ☢️ experimental ☢️
Stars: ✭ 351 (+1964.71%)
Mutual labels:  experimental
Gravity
Gravity Programming Language
Stars: ✭ 3,968 (+23241.18%)
Mutual labels:  object-oriented
Xxl Crawler
A distributed web crawler framework.(分布式爬虫框架XXL-CRAWLER)
Stars: ✭ 561 (+3200%)
Mutual labels:  object-oriented
Reactive Streams Commons
A joint research effort for building highly optimized Reactive-Streams compliant operators.
Stars: ✭ 335 (+1870.59%)
Mutual labels:  experimental
Kvision
Object oriented web framework for Kotlin/JS
Stars: ✭ 658 (+3770.59%)
Mutual labels:  object-oriented
30log
30 lines library for object orientation in Lua
Stars: ✭ 313 (+1741.18%)
Mutual labels:  object-oriented
Oryoki
Ōryōki [応量器] is an experimental web browser with a thin interface.
Stars: ✭ 484 (+2747.06%)
Mutual labels:  experimental
Reality
Comprehensive data proxy to knowledge about real world
Stars: ✭ 795 (+4576.47%)
Mutual labels:  experimental
Snek
See https://github.com/inconvergent/weir instead
Stars: ✭ 696 (+3994.12%)
Mutual labels:  experimental
Jaspy
a Python VM written entirely from scratch in JavaScript with some unique features
Stars: ✭ 577 (+3294.12%)
Mutual labels:  experimental

#ForEx

Fortran User Defined Exceptions Handler

Experimental Code: Use it carefully! still under development

Build Status codecov.io

##License

License

##What is ForEx?

ForEx is fortran 2003 project taking advance of the C preprocessor capabilities in order to emulate exception handling.

##Features

  • Exception hierarchy: ForEx can handle any error object extended from the Exception base class.
  • Local flow control: throwing an exception changes the local flow. THROW performs local jumps to the end of the TRY frame or FINALLY.
  • Global handling: the exception stack is a global object under the singleton pattern.
  • Single THROW call per scope:
    • Single throw call per local TRY scope.
    • Single throw call per local CATCH scope.
    • Single throw call per local FINALLY scope.
  • Re-throwing: a exception can be raised again in the CATCH scope.
  • Re-throwing Backtrace: an exception saves the stack of contexts where it has been throwed.
  • Handle throwed exceptions: CATCH iterate over all the exceptions looking for the first that matches the same class.
  • CATCH precedence: multiple CATCH calls in the same TRY frame are executed sequencially.
  • Automatic exception stack cleaning when CATCH: if several exceptions has been thrown along the program, only one of them will be handled in the next CATCH call.
  • Customizable catching action: Exception class contains the Catch procedure to customize the action performed when cathing it.
  • Automatic Backtrace of non handled exceptions: going out of the main TRY/ENDTRY scope with non handled exceptions in the stack causes exception backtrace flush.

##How to get ForEx

git clone https://github.com/victorsndvg/Forex.git

##Compilation

ForEx compile with GNU Fortran compiler 5.1 (and newer versions) and Intel Fortran compiler 15.0.1 (and newer versions).

ForEx uses CMake as a portable compilation system.

The easiest way to compile ForEx under Linux is:

$ cd ForEx
$ mkdir build
$ cd build
$ cmake ../
$ make

To compile ForEx under Windows use de equivalent commands

Remember, ForEx take advantage of the C preprocessor. To include it in your project, you have to add the preprocessor flags while compiling. Preprocesor flags depending on the compiler vendor:

  • GNU Fortran: -cpp
  • Intel Fortran: -fpp
  • IBM XLF: -qsuffix=f=f90:cpp=f90

###Using ForEx in your program

program test
USE ForEx

implicit none
#include "ExceptionHandler.i90"

TRY
    ! Variable allocation
    if(Error) then
        THROW(Exception(Code=-1, Message='An error message')
    endif
CATCH(Exception, Ex)
    call Ex%Print()
FINALLY
    ! Variable deallocation
ENDTRY

end program test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].