How to resolve the algorithm File size step by step in the Toka programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm File size step by step in the Toka programming language

Table of Contents

Problem Statement

Verify the size of a file called     input.txt     for a file in the current working directory, and another one in the file system root.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm File size step by step in the Toka programming language

Source code in the toka programming language

" input.txt"  "R" file.open dup file.size . file.close
" /input.txt" "R" file.open dup file.size . file.close

[ "R" file.open
  dup 0 <> [ dup file.size . file.close ] ifTrue
  drop
] is display-size

" input.txt"  display-size
" /input.txt" display-size

  

You may also check:How to resolve the algorithm Ethiopian multiplication step by step in the ColdFusion programming language
You may also check:How to resolve the algorithm Longest common subsequence step by step in the JavaScript programming language
You may also check:How to resolve the algorithm Nested templated data step by step in the Phix programming language
You may also check:How to resolve the algorithm Stack step by step in the Wart programming language
You may also check:How to resolve the algorithm Anonymous recursion step by step in the Kotlin programming language