first commit

This commit is contained in:
Jose Caban
2025-06-07 11:38:03 -04:00
commit e0316ca3ff
79 changed files with 3155 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
with Ada.Text_IO;
procedure Helloworld is
begin
Ada.Text_IO.Put_Line("Hello, world!");
end Helloworld;

View File

@@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.10)
# Modify only these if one source file!
project(CHelloWorld)
set(CURRENT_PROJECT_CODE_NAME helloworld)
set(FILE_EXT c)
# End
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED True)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# We want all the warnings and as errors enabled
if (MSVC)
# warning level 4 and all warnings as errors
add_compile_options(/W4 /WX)
else()
# lots of warnings and all warnings as errors
add_compile_options(-Wall -Wextra -pedantic -Werror)
endif()
add_executable(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/${CURRENT_PROJECT_CODE_NAME}.${FILE_EXT})
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC
${EXTRA_INCLUDES}
)
target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC
${EXTRA_LIBS}
)

View File

@@ -0,0 +1,8 @@
#include <stdio.h>
int main(int argc, char **argv)
{
(void)argc;
(void)argv;
return printf("Hello, World!\n");
}

View File

@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.10)
include(${CMAKE_CURRENT_LIST_DIR}/C/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/Cpp/CMakeLists.txt)
if (!WIN32)
include(${CMAKE_CURRENT_LIST_DIR}/Fortran/CMakeLists.txt)
endif()

View File

@@ -0,0 +1,10 @@
namespace LanguageBasics
{
class CSharpHelloWorld
{
static void Main()
{
System.Console.WriteLine("Hello, World!");
}
}
}

View File

@@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.10)
# Modify only these if one source file!
project(CppHelloWorld)
set(CURRENT_PROJECT_CODE_NAME helloworld)
set(FILE_EXT cpp)
# End
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED True)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# We want all the warnings and as errors enabled
if (MSVC)
# warning level 4 and all warnings as errors
add_compile_options(/W4 /WX)
else()
# lots of warnings and all warnings as errors
add_compile_options(-Wall -Wextra -pedantic -Werror)
endif()
add_executable(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/${CURRENT_PROJECT_CODE_NAME}.${FILE_EXT})
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC
${EXTRA_INCLUDES}
)
target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC
${EXTRA_LIBS}
)

View File

@@ -0,0 +1,7 @@
#include <iostream>
int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}

View File

@@ -0,0 +1,6 @@
import std.stdio;
void main()
{
writeln("Hello, World!");
}

View File

@@ -0,0 +1,34 @@
cmake_minimum_required(VERSION 3.10)
# Modify only these if one source file!
project(FortranHelloWorld)
set(CURRENT_PROJECT_CODE_NAME helloworld)
set(FILE_EXT f90)
enable_language(Fortran)
# End
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED True)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# We want all the warnings and as errors enabled
if (MSVC)
# warning level 4 and all warnings as errors
add_compile_options(/W4 /WX)
else()
# lots of warnings and all warnings as errors
add_compile_options(-Wall -Wextra -pedantic -Werror)
endif()
add_executable(${CMAKE_PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/${CURRENT_PROJECT_CODE_NAME}.${FILE_EXT})
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC
${EXTRA_INCLUDES}
)
target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC
${EXTRA_LIBS}
)

View File

@@ -0,0 +1,3 @@
program hello
print *, "Hello World!"
end program hello

View File

@@ -0,0 +1,2 @@
main :: IO()
main = putStrLn "Hello, World!"

View File

@@ -0,0 +1,16 @@
/*
* Implementation note: for simplicity in the makefiles, we violate the
* Coding standard for the name. Rather than use HelloWorld, we write
* helloworld to match the file name.
* It's not the best reason, but it means the makefiles wont build stuff
* that is already built.
*/
class helloworld
{
// Your program begins with a call to main().
// Prints "Hello, World" to the terminal window.
public static void main(String args[])
{
System.out.println("Hello, World");
}
}

View File

@@ -0,0 +1 @@
print("Hello, World!")

View File

@@ -0,0 +1,4 @@
fn main() {
println!("Hello, World!");
}